#include <mcllib/MCRWMutex.h>
Inheritance diagram for MCRWMutex:
Public Member Functions | |
virtual void | lock () |
Obtain a read lock on the the mutex object. | |
MCRWMutex (const char *name, mcuint32 rank=0) | |
Open an RW Mutex. | |
virtual void | readLock () |
Obtain a read lock on the mutex object. | |
virtual void | unlock () |
Unlock the mutex object. | |
virtual void | writeLock () |
Obtain a write lock on the mutex object. | |
virtual | ~MCRWMutex () |
Virtual destructor. |
Multiple readers or a single writer may lock the object concurrently. Readers/writer mutex objects can be shared across processes. A name specified when the object is created is used to allow the IPC.
|
Open an RW Mutex.
|
|
Virtual destructor. Free any allocated resources |
|
Obtain a read lock on the mutex object. Multiple readers may concurrently hold a read lock but not at the same time as a writer. |
|
Unlock the mutex object. It doesn't matter if the mutex was previously read or write locked. Implements MCMutex. |
|
Obtain a write lock on the mutex object. A single writer may hold a read lock but not at the same time as other writers or readers. |