Dash Core  0.12.2.1
P2P Digital Currency
CSemaphoreGrant Class Reference

#include <sync.h>

Public Member Functions

void Acquire ()
 
void Release ()
 
bool TryAcquire ()
 
void MoveTo (CSemaphoreGrant &grant)
 
 CSemaphoreGrant ()
 
 CSemaphoreGrant (CSemaphore &sema, bool fTry=false)
 
 ~CSemaphoreGrant ()
 
 operator bool ()
 

Private Attributes

CSemaphoresem
 
bool fHaveGrant
 

Detailed Description

RAII-style semaphore lock

Definition at line 223 of file sync.h.

Constructor & Destructor Documentation

◆ CSemaphoreGrant() [1/2]

CSemaphoreGrant::CSemaphoreGrant ( )
inline

Definition at line 262 of file sync.h.

◆ CSemaphoreGrant() [2/2]

CSemaphoreGrant::CSemaphoreGrant ( CSemaphore sema,
bool  fTry = false 
)
inline

Definition at line 264 of file sync.h.

◆ ~CSemaphoreGrant()

CSemaphoreGrant::~CSemaphoreGrant ( )
inline

Definition at line 272 of file sync.h.

Member Function Documentation

◆ Acquire()

void CSemaphoreGrant::Acquire ( )
inline

Definition at line 230 of file sync.h.

Referenced by CSemaphoreGrant().

◆ MoveTo()

void CSemaphoreGrant::MoveTo ( CSemaphoreGrant grant)
inline

◆ operator bool()

CSemaphoreGrant::operator bool ( )
inline

Definition at line 277 of file sync.h.

◆ Release()

void CSemaphoreGrant::Release ( )
inline

Definition at line 238 of file sync.h.

Referenced by MoveTo(), CConnman::ThreadSocketHandler(), and ~CSemaphoreGrant().

◆ TryAcquire()

bool CSemaphoreGrant::TryAcquire ( )
inline

Definition at line 246 of file sync.h.

Referenced by CSemaphoreGrant().

Member Data Documentation

◆ fHaveGrant

bool CSemaphoreGrant::fHaveGrant
private

Definition at line 227 of file sync.h.

Referenced by Acquire(), MoveTo(), operator bool(), Release(), and TryAcquire().

◆ sem

CSemaphore* CSemaphoreGrant::sem
private

Definition at line 226 of file sync.h.

Referenced by Acquire(), MoveTo(), Release(), and TryAcquire().


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