Read-write synchronization object.
More...
#include <base/concurrency/ReadWriteSpinLock.h>
Read-write synchronization object.
This class implements a read-write lock for optimal reader performance on systems. Please note that the lock/unlock mechanism is considered a non-modifying property of a class.
- See also
- MutualExclusion ReadWriteLock SpinLock
- Version
- 1.0
◆ ReadWriteSpinLock()
ReadWriteSpinLock::ReadWriteSpinLock |
( |
| ) |
|
|
noexcept |
Initializes the spin lock in unlocked state.
◆ exclusiveLock()
void ReadWriteSpinLock::exclusiveLock |
( |
| ) |
const |
|
noexcept |
Acquires an exclusive lock.
◆ releaseLock()
void ReadWriteSpinLock::releaseLock |
( |
| ) |
const |
|
noexcept |
◆ sharedLock()
void ReadWriteSpinLock::sharedLock |
( |
| ) |
const |
|
inlinenoexcept |
◆ tryExclusiveLock()
bool ReadWriteSpinLock::tryExclusiveLock |
( |
| ) |
const |
|
noexcept |
Tries to acquire an exclusive lock.
- Returns
- True on success.
◆ trySharedLock()
bool ReadWriteSpinLock::trySharedLock |
( |
| ) |
const |
|
noexcept |
Tries to acquire a shared lock.
- Returns
- True on success.