#include <PhxLocks.h>
Public Member Functions | |
| ReadLockHolder (const ReadWriteLock *lock) | |
| Constructs a new reader lock holder, which takes and holds the reader privilege to a reader/writer lock. | |
| ReadLockHolder (ReadLockHolder *lockHolder) | |
| Creates a new lock holder that takes over ownership of a read lock from another read-lock holder. | |
| ~ReadLockHolder () | |
| Destructor that releases the reader 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 reading 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 reader lock holder, which takes and holds the reader privilege to a reader/writer lock.
|
|
|
Creates a new lock holder that takes over ownership of a read lock from another read-lock holder.
|
|
|
Destructor that releases the reader lock. If the lock was transferred to another owner 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