ATLAS Offline Software
Loading...
Searching...
No Matches
PoolSvc::ContextLock Class Reference
Collaboration diagram for PoolSvc::ContextLock:

Public Member Functions

 ContextLock (int contextId, CallMutex &glob_mtx, const std::vector< CallMutex * > &ctx_mutexes)
 ~ContextLock ()

Private Attributes

std::unique_lock< CallMutexm_lock

Detailed Description

Definition at line 211 of file PoolSvc.h.

Constructor & Destructor Documentation

◆ ContextLock()

PoolSvc::ContextLock::ContextLock ( int contextId,
CallMutex & glob_mtx,
const std::vector< CallMutex * > & ctx_mutexes )
inline

Definition at line 214 of file PoolSvc.h.

214 {
215 // lock the global mutex to gain exclusive access to the context mutexes vector
216 std::lock_guard<CallMutex> temp_lock( glob_mtx );
217 // lock the mutex for the given context ID for the lifetime of this object
218 m_lock = std::unique_lock< CallMutex >{ *ctx_mutexes[contextId] };
219 }
std::unique_lock< CallMutex > m_lock
Definition PoolSvc.h:212

◆ ~ContextLock()

PoolSvc::ContextLock::~ContextLock ( )
inline

Definition at line 220 of file PoolSvc.h.

220{ m_lock.unlock(); }

Member Data Documentation

◆ m_lock

std::unique_lock< CallMutex > PoolSvc::ContextLock::m_lock
private

Definition at line 212 of file PoolSvc.h.


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