This class holds locks on an array of locks, established in sequential order, and unlocks them upon destruction in the RAII pattern.

Synopsis

Declared in <bdlcc_stripedunorderedcontainerimpl.h>

class StripedUnorderedContainerImpl_ArrayOfLocksWriteGuard;

Member Functions

Name

Description

StripedUnorderedContainerImpl_ArrayOfLocksWriteGuard [constructor]

Create a guard object 'StripedUnorderedContainerImpl_ArrayOfLocksWriteGuard' to lock and unlock elements in an array beginning with the lock pointed to by the specified 'firstLock'. Note that this lock is not locked on construction.

~StripedUnorderedContainerImpl_ArrayOfLocksWriteGuard [destructor]

Release all guarded locks and destroy this object.

lock

Lock the specified *lock_p and add it to the collection of locks to be unlocked upon destruction of this object. The behavior is undefined unless 'lock_p' is adjacent to the previously locked lock, or is the same lock provided to the constructor if this is the first call to lock on this object.

Created with MrDocs