Using scoped_lock, you don't need to explicitly lock or unlock the file; the locking occurs inside the constructor, and the unlocking happens automatically whenever you exit the scope.
如果使用scoped_lock,就不需要显式地锁定或解锁文件;锁定发生在构造器内,每当您退出该范围,就会自动发生解锁。
It is the lightest as execution time, often a lock or unlock becomes just a single inlined assembler instruction.
就运行时间而言是最轻便的,大多数情况下只需要单条内联汇编指令就可以上锁或解锁。
Forum Status - a dropdown list box that will allow you to lock or unlock a forum. A locked forum may not be posted to except by moderators and administrators.
版面状态-在下拉选单中,你可以选择是否锁定该版面。一个被锁定的版面只允许版面管理员以及系统管理员发表文章和主题。
Forum Status - a dropdown list box that will allow you to lock or unlock a forum. A locked forum may not be posted to except by moderators and administrators.
版面状态-在下拉选单中,你可以选择是否锁定该版面。一个被锁定的版面只允许版面管理员以及系统管理员发表文章和主题。
应用推荐