Ion
|
A ReadLock obtains a read lock, but has a similar interface to a Mutex and can be used with a ReadGuard. More...
#include "readwritelock.h"
Public Member Functions | |
ReadLock (ReadWriteLock *lock) | |
The passed pointer must be non-NULL. More... | |
~ReadLock () | |
void | Lock () |
"Locks" the lock for reading, which may or may not block. More... | |
void | Unlock () |
"Unlocks" the lock for reading, which may allow other writers to proceed. More... | |
bool | IsLocked () const |
Returns whether there are any readers in the lock. More... | |
A ReadLock obtains a read lock, but has a similar interface to a Mutex and can be used with a ReadGuard.
Definition at line 86 of file readwritelock.h.
|
inlineexplicit |
The passed pointer must be non-NULL.
Definition at line 89 of file readwritelock.h.
|
inline |
Definition at line 90 of file readwritelock.h.
|
inline |
Returns whether there are any readers in the lock.
This is not the same as what it means for a Mutex to be locked, but is a convenient way of determining whether any readers are currently active though a Mutex-like interface that LockGuards can understand.
Definition at line 101 of file readwritelock.h.
|
inline |
"Locks" the lock for reading, which may or may not block.
See the comments for ReadWriteLock.
Definition at line 93 of file readwritelock.h.
|
inline |
"Unlocks" the lock for reading, which may allow other writers to proceed.
See the comments for ReadWriteLock.
Definition at line 96 of file readwritelock.h.