Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

Wrapper around std::unique_lock<CCriticalSection> More...

#include <sync.h>

Public Member Functions

 CCriticalBlock (CCriticalSection &mutexIn, const char *pszName, const char *pszFile, int nLine, bool fTry=false) EXCLUSIVE_LOCK_FUNCTION(mutexIn)
 
 CCriticalBlock (CCriticalSection *pmutexIn, const char *pszName, const char *pszFile, int nLine, bool fTry=false) EXCLUSIVE_LOCK_FUNCTION(pmutexIn)
 
 ~CCriticalBlock () 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

std::unique_lock< CCriticalSectionlock
 

Detailed Description

Wrapper around std::unique_lock<CCriticalSection>

Definition at line 116 of file sync.h.

Constructor & Destructor Documentation

◆ CCriticalBlock() [1/2]

CCriticalBlock::CCriticalBlock ( CCriticalSection mutexIn,
const char *  pszName,
const char *  pszFile,
int  nLine,
bool  fTry = false 
)
inline

Definition at line 144 of file sync.h.

◆ CCriticalBlock() [2/2]

CCriticalBlock::CCriticalBlock ( CCriticalSection pmutexIn,
const char *  pszName,
const char *  pszFile,
int  nLine,
bool  fTry = false 
)
inline

Definition at line 152 of file sync.h.

◆ ~CCriticalBlock()

CCriticalBlock::~CCriticalBlock ( )
inline

Definition at line 163 of file sync.h.

References LeaveCritical().

Member Function Documentation

◆ Enter()

void CCriticalBlock::Enter ( const char *  pszName,
const char *  pszFile,
int  nLine 
)
inlineprivate

Definition at line 121 of file sync.h.

References EnterCritical().

◆ operator bool()

CCriticalBlock::operator bool ( )
inline

Definition at line 169 of file sync.h.

◆ TryEnter()

bool CCriticalBlock::TryEnter ( const char *  pszName,
const char *  pszFile,
int  nLine 
)
inlineprivate

Definition at line 134 of file sync.h.

References EnterCritical(), and LeaveCritical().

Member Data Documentation

◆ lock

std::unique_lock<CCriticalSection> CCriticalBlock::lock
private

Definition at line 119 of file sync.h.


The documentation for this class was generated from the following file:
Released under the MIT license