The AutoMultiLockN family of classes provides a possibility to manage several read/write semaphores at once. This is handy if all managed semaphores need to be locked and unlocked synchronously and will also help to avoid locking order errors.
Instances of AutoMultiLockN classes are constructed from a list of LockOps arguments. The AutoMultiLockBase::lock() method will make sure that the given list of semaphores represented by LockOps pointers will be locked in order they are passed to the constructor. The AutoMultiLockBase::unlock() method will make sure that they will be unlocked in reverse order.
The type of the lock to request is specified for each semaphore individually using the corresponding LockOps getter of a LockHandle or Lockable object: LockHandle::wlock() in order to request a write lock or LockHandle::rlock() in order to request a read lock.
Public Member Functions
|AutoMultiLock2 (A(0), A(1))|
|LockOps *||mOps [Cnt]|