Raven Core  3.0.0
P2P Digital Currency
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CMutexLock< Mutex > Class Template Reference

Wrapper around boost::unique_lock<Mutex> More...

#include <sync.h>

Public Member Functions

 CMutexLock (Mutex &mutexIn, const char *pszName, const char *pszFile, int nLine, bool fTry=false) EXCLUSIVE_LOCK_FUNCTION(mutexIn)
 
 CMutexLock (Mutex *pmutexIn, const char *pszName, const char *pszFile, int nLine, bool fTry=false) EXCLUSIVE_LOCK_FUNCTION(pmutexIn)
 
 ~CMutexLock () UNLOCK_FUNCTION()
 
 operator bool ()
 

Private Member Functions

void Enter (const char *pszName, const char *pszFile, int nLine)
 
bool TryEnter (const char *pszName, const char *pszFile, int nLine)
 

Private Attributes

boost::unique_lock< Mutex > lock
 

Detailed Description

template<typename Mutex>
class CMutexLock< Mutex >

Wrapper around boost::unique_lock<Mutex>

Definition at line 112 of file sync.h.

Constructor & Destructor Documentation

◆ CMutexLock() [1/2]

template<typename Mutex >
CMutexLock< Mutex >::CMutexLock ( Mutex &  mutexIn,
const char *  pszName,
const char *  pszFile,
int  nLine,
bool  fTry = false 
)
inline

Definition at line 140 of file sync.h.

◆ CMutexLock() [2/2]

template<typename Mutex >
CMutexLock< Mutex >::CMutexLock ( Mutex *  pmutexIn,
const char *  pszName,
const char *  pszFile,
int  nLine,
bool  fTry = false 
)
inline

Definition at line 148 of file sync.h.

◆ ~CMutexLock()

template<typename Mutex >
CMutexLock< Mutex >::~CMutexLock ( )
inline

Definition at line 159 of file sync.h.

Member Function Documentation

◆ Enter()

template<typename Mutex >
void CMutexLock< Mutex >::Enter ( const char *  pszName,
const char *  pszFile,
int  nLine 
)
inlineprivate

Definition at line 117 of file sync.h.

◆ operator bool()

template<typename Mutex >
CMutexLock< Mutex >::operator bool ( )
inline

Definition at line 165 of file sync.h.

◆ TryEnter()

template<typename Mutex >
bool CMutexLock< Mutex >::TryEnter ( const char *  pszName,
const char *  pszFile,
int  nLine 
)
inlineprivate

Definition at line 130 of file sync.h.

Member Data Documentation

◆ lock

template<typename Mutex >
boost::unique_lock<Mutex> CMutexLock< Mutex >::lock
private

Definition at line 115 of file sync.h.


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