reader_writer_lock Class
A writer-preference queue-based reader-writer lock with local only spinning. The lock grants first in - first out (FIFO) access to writers and starves readers under a continuous load of writers.
class reader_writer_lock;
|
Name |
Description |
|---|---|
|
Acquires the reader-writer lock as a writer. |
|
|
Acquires the reader-writer lock as a reader. If there are writers, active readers have to wait until they are done. The reader simply registers an interest in the lock and waits for writers to release it. |
|
|
Attempts to acquire the reader-writer lock as a writer without blocking. |
|
|
Attempts to acquire the reader-writer lock as a reader without blocking. |
|
|
Unlocks the reader-writer lock based on who locked it, reader or writer. |
For more information, see Synchronization Data Structures.