![]() |
NDEVR
API Documentation
|
Acquires read locks on multiple RWLocks simultaneously in a deadlock-safe order. More...
Public Member Functions | |
| MultiRLock (MultiRLock &&lock) noexcept | |
| Move constructor. | |
| MultiRLock (std::initializer_list< const void * > l) | |
| Constructs read locks on multiple entries identified by pointers. | |
| MultiRLock (std::initializer_list< const void * > l, uint08 timeout) | |
| Constructs read locks on multiple entries with a timeout. | |
| MultiRLock (std::initializer_list< RWLock * > l) | |
| Constructs read locks on multiple RWLocks directly. | |
| ~MultiRLock () | |
| Destructor. | |
| bool | isLocked () const |
| Returns whether all locks in this MultiRLock are currently held. | |
Acquires read locks on multiple RWLocks simultaneously in a deadlock-safe order.
Automatically unlocks all held locks on destruction.
| MultiRLock::MultiRLock | ( | std::initializer_list< const void * > | l | ) |
Constructs read locks on multiple entries identified by pointers.
| [in] | l | The list of pointer keys used to look up the RWLocks. |
Referenced by MultiRLock().
| MultiRLock::MultiRLock | ( | std::initializer_list< RWLock * > | l | ) |
Constructs read locks on multiple RWLocks directly.
| [in] | l | The list of RWLock pointers to acquire read locks on. |
| MultiRLock::MultiRLock | ( | std::initializer_list< const void * > | l, |
| uint08 | timeout ) |
Constructs read locks on multiple entries with a timeout.
| [in] | l | The list of pointer keys used to look up the RWLocks. |
| [in] | timeout | The maximum time in nanoseconds to wait for each lock. |
|
noexcept |
Move constructor.
Transfers lock ownership from another MultiRLock.
| [in] | lock | The MultiRLock to move from. |
References MultiRLock().
| MultiRLock::~MultiRLock | ( | ) |
Destructor.
Releases all held read locks.
| bool MultiRLock::isLocked | ( | ) | const |
Returns whether all locks in this MultiRLock are currently held.