AWS SDK for C++AWS SDK for C++ Version 1.11.924 |
#include <ReaderWriterLock.h>
Public Member Functions | |
| ReaderWriterLock () | |
| void | LockReader () |
| void | UnlockReader () |
| void | LockWriter () |
| void | UnlockWriter () |
This lock is optimized for frequent reads and infrequent writes. However, writers get priority to the lock.
Definition at line 25 of file ReaderWriterLock.h.
| Aws::Utils::Threading::ReaderWriterLock::ReaderWriterLock | ( | ) |
| void Aws::Utils::Threading::ReaderWriterLock::LockReader | ( | ) |
Enters the lock in Reader-mode. This call blocks until no writers are acquiring the lock.
| void Aws::Utils::Threading::ReaderWriterLock::LockWriter | ( | ) |
Enters the lock in Writer-mode. This call blocks until no readers nor writers are acquiring the lock.
| void Aws::Utils::Threading::ReaderWriterLock::UnlockReader | ( | ) |
Decrements the readers count by one and if the count is zero, signals any waiting writers to acquire the lock. NOTE: Calling this function without a matching LockReader results in undefined behavior.
| void Aws::Utils::Threading::ReaderWriterLock::UnlockWriter | ( | ) |
Decrements the number of writers by one and signals any waiting readers or writers to acquire the lock. NOTE: Calling this function without a matching LockWriter results in undefined behavior.