Platform‐independent interface to a reader‐writer mutex.
Synopsis
Declared in <bslmt_rwmutex.h>
class RWMutex;
Description
This class is a platform‐independent interface to a reader‐writer lock ("RW mutex"). Multiple readers can safely hold the lock simultaneously, whereas only one writer is allowed to hold the lock at a time. This class uses the most efficient RW mutex implementation available for the current platform. Note that the implementation may allow readers to starve writers.
Member Functions
Name |
Description |
|
Create an RW mutex initialized to an unlocked state. |
|
Destroy this RW mutex. The behavior is undefined if the mutex is in a locked state. |
Lock this reader‐writer mutex for reading. |
|
Lock this reader‐writer mutex for writing. |
|
Attempt to lock this reader‐writer mutex for reading. |
|
Attempt to lock this reader‐writer mutex for writing. |
|
Release the lock held by the calling thread on this mutex. |
Created with MrDocs