Writer lock object for read-write mutexes.
Public Member Functions
|WriteLock (ReadWriteMutex &m, bool doLock=true, bool isLocked=false)|
|Construct to guard a ReadWriteMutex. More...|
|Unlocks the mutex unless unlock() was called. |
|Locks the mutex. |
|ReadWriteMutex &||mutex ()|
|Returns the guarded the mutex object. |
|Unlocks the mutex. |
Constructs a WriteLock object and locks the enclosing read-write mutex if doLock is true. If isLocked is true, the WriteLock will only unlock the given mutex in the destructor, but not lock it in the constructor.