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