BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bdlcc::StripedUnorderedContainerImpl_ArrayOfLocksWriteGuard Class Reference

#include <bdlcc_stripedunorderedcontainerimpl.h>

Detailed Description

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

See bdlcc_stripedunorderedcontainerimpl

Public Member Functions

 StripedUnorderedContainerImpl_ArrayOfLocksWriteGuard (StripedUnorderedContainerImpl_LockElement *firstLock_p)
 
 ~StripedUnorderedContainerImpl_ArrayOfLocksWriteGuard ()
 
void lock (StripedUnorderedContainerImpl_LockElement *lock_p)
 

Constructor & Destructor Documentation

◆ StripedUnorderedContainerImpl_ArrayOfLocksWriteGuard()

bdlcc::StripedUnorderedContainerImpl_ArrayOfLocksWriteGuard::StripedUnorderedContainerImpl_ArrayOfLocksWriteGuard ( StripedUnorderedContainerImpl_LockElement firstLock_p)
inline

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
Note that this lock is not locked on construction.

◆ ~StripedUnorderedContainerImpl_ArrayOfLocksWriteGuard()

bdlcc::StripedUnorderedContainerImpl_ArrayOfLocksWriteGuard::~StripedUnorderedContainerImpl_ArrayOfLocksWriteGuard ( )
inline

Member Function Documentation

◆ lock()

void bdlcc::StripedUnorderedContainerImpl_ArrayOfLocksWriteGuard::lock ( StripedUnorderedContainerImpl_LockElement lock_p)
inline

Lock the specified *lock_p and add it to the collection of locks to be unlocked upon destruction of this object.

Precondition
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.

The documentation for this class was generated from the following file: