Dash Core  0.12.2.1
P2P Digital Currency
CSemaphore Class Reference

#include <sync.h>

Public Member Functions

 CSemaphore (int init)
 
void wait ()
 
bool try_wait ()
 
void post ()
 

Private Attributes

boost::condition_variable condition
 
boost::mutex mutex
 
int value
 

Detailed Description

Definition at line 184 of file sync.h.

Constructor & Destructor Documentation

◆ CSemaphore()

CSemaphore::CSemaphore ( int  init)
inline

Definition at line 192 of file sync.h.

Member Function Documentation

◆ post()

void CSemaphore::post ( )
inline

Definition at line 212 of file sync.h.

Referenced by CConnman::Interrupt(), CSemaphoreGrant::Release(), and CConnman::Stop().

◆ try_wait()

bool CSemaphore::try_wait ( )
inline

Definition at line 203 of file sync.h.

Referenced by CSemaphoreGrant::TryAcquire().

◆ wait()

void CSemaphore::wait ( )
inline

Definition at line 194 of file sync.h.

Referenced by CSemaphoreGrant::Acquire().

Member Data Documentation

◆ condition

boost::condition_variable CSemaphore::condition
private

Definition at line 187 of file sync.h.

Referenced by post(), and wait().

◆ mutex

boost::mutex CSemaphore::mutex
private

Definition at line 188 of file sync.h.

Referenced by post(), try_wait(), and wait().

◆ value

int CSemaphore::value
private

Definition at line 189 of file sync.h.

Referenced by post(), try_wait(), and wait().


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