#include <spinlock.h>
详细描述
The
ScopedReadLock
class acquires a read lock to the specified mutex upon creation and releases this upon destruction (usually at the end of a code block. This simplifies cases where your code contains many return statements where you'd otherwise have to manually unlock before returning.
Only use
ScopedReadLock
for a short block of your code.
THREADSAFE.
构造函数 & 析构函数文档编制
◆
ScopedReadLock()
[1/2]
Acquires read access to the specified lock (and releases it upon destruction).
-
参数
-
[in]
|
lock
|
The lock to be acquired.
|