OverSim
XmlRpc::XmlRpcMutex::AutoLock Struct Reference

Utility class to acquire a mutex at construction and release it when destroyed. More...

#include <XmlRpcMutex.h>

Public Member Functions

 AutoLock (XmlRpcMutex &m)
 Acquire the mutex at construction.
 ~AutoLock ()
 Release at destruction.

Public Attributes

XmlRpcMutex_m
 The mutex being held.

Detailed Description

Utility class to acquire a mutex at construction and release it when destroyed.

Definition at line 34 of file XmlRpcMutex.h.

Constructor & Destructor Documentation

XmlRpc::XmlRpcMutex::AutoLock::AutoLock ( XmlRpcMutex m)
inline

Acquire the mutex at construction.

Definition at line 36 of file XmlRpcMutex.h.

: _m(m) { _m.acquire(); }
XmlRpc::XmlRpcMutex::AutoLock::~AutoLock ( )
inline

Release at destruction.

Definition at line 38 of file XmlRpcMutex.h.

{ _m.release(); }

Member Data Documentation

XmlRpcMutex& XmlRpc::XmlRpcMutex::AutoLock::_m

The mutex being held.

Definition at line 40 of file XmlRpcMutex.h.

Referenced by AutoLock(), and ~AutoLock().


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