#include <PhxLocks.h>
Public Member Functions | |
| WriteLockHolder (const ReadWriteLock *lock) | |
| Constructs a new write lock holder, which takes and holds the writer privilege to a reader/writer lock. | |
| WriteLockHolder (WriteLockHolder *lockHolder) | |
| Creates a new lock holder that takes over ownership of a write lock from another write-lock holder. | |
| ~WriteLockHolder () | |
| Destructor that releases the writer lock. | |
| void | unlock (void) |
| Explicitly unlocks the mutex held by this LockHolder. | |
This is used as a safe locking mechanism in the presence of exceptions. Pass it the read/write lock to be locked. The constructor will lock the given mutex for writing and only return once it is obtained (or throw an exception in the case of error). When this object is destructed, the lock is released.
|
|
Constructs a new write lock holder, which takes and holds the writer privilege to a reader/writer lock.
|
|
|
Creates a new lock holder that takes over ownership of a write lock from another write-lock holder.
|
|
|
Destructor that releases the writer lock. If the lock ownership was transferred to another lock then this does nothing. |
|
|
Explicitly unlocks the mutex held by this LockHolder. Once this is called, the lock is released and this holder will do nothing on destruction. |
1.4.2