This class provides a multi‐reader/single‐writer lock mechanism.
Synopsis
Declared in <bslmt_readerwritermutex.h>
class ReaderWriterMutex;
Member Functions
Name |
Description |
|
Construct a reader/writer lock initialized to an unlocked state. |
Return |
|
Return |
|
Return |
|
Lock this reader‐writer mutex for reading. If there are no active or pending write locks, lock this mutex for reading and return immediately. Otherwise, block until the read lock on this mutex is acquired. Use |
|
Lock this reader‐writer mutex for writing. If there are no active or pending locks on this mutex, lock this mutex for writing and return immediately. Otherwise, block until the write lock on this mutex is acquired. Use |
|
Attempt to lock this reader‐writer mutex for reading. Immediately return 0 on success, and a non‐zero value if there are active or pending writers. If successful, |
|
Attempt to lock this reader‐writer mutex for writing. Immediately return 0 on success, and a non‐zero value if there are active or pending locks on this mutex. If successful, |
|
Release the lock that the calling thread holds on this reader‐writer mutex. The behavior is undefined unless the calling thread currently has a lock on this mutex. |
|
Release the read lock that the calling thread holds on this reader‐writer mutex. The behavior is undefined unless the calling thread currently has a read lock on this mutex. |
|
Release the write lock that the calling thread holds on this reader‐writer mutex. The behavior is undefined unless the calling thread currently has a write lock on this mutex. |
Created with MrDocs