ATLAS Offline Software
Loading...
Searching...
No Matches
Athena::ToolLock Class Reference

RAII helper for acquiring the lock of an ILockableTool. More...

#include <ILockableTool.h>

Collaboration diagram for Athena::ToolLock:

Public Member Functions

 ToolLock (ILockableTool &tool)
 Acquire the lock of tool.
 ~ToolLock ()
 Release the lock.

Private Attributes

ILockableToolm_tool

Detailed Description

RAII helper for acquiring the lock of an ILockableTool.

Definition at line 42 of file ILockableTool.h.

Constructor & Destructor Documentation

◆ ToolLock()

Athena::ToolLock::ToolLock ( ILockableTool & tool)
inline

Acquire the lock of tool.

Definition at line 46 of file ILockableTool.h.

47 : m_tool (tool)
48 {
49 m_tool.lock_shared();
50 }
ILockableTool & m_tool

◆ ~ToolLock()

Athena::ToolLock::~ToolLock ( )
inline

Release the lock.

Definition at line 53 of file ILockableTool.h.

54 {
55 m_tool.unlock_shared();
56 }

Member Data Documentation

◆ m_tool

ILockableTool& Athena::ToolLock::m_tool
private

Definition at line 60 of file ILockableTool.h.


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