Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

#include <sync.h>

Public Member Functions

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

Private Attributes

std::condition_variable condition
 
std::mutex mutex
 
int value
 

Detailed Description

Definition at line 194 of file sync.h.

Constructor & Destructor Documentation

◆ CSemaphore()

CSemaphore::CSemaphore ( int  init)
inlineexplicit

Definition at line 202 of file sync.h.

Member Function Documentation

◆ post()

void CSemaphore::post ( )
inline

Definition at line 220 of file sync.h.

References condition, mutex, and value.

Referenced by CSemaphoreGrant::Release().

◆ try_wait()

bool CSemaphore::try_wait ( )
inline

Definition at line 211 of file sync.h.

References mutex, and value.

Referenced by CSemaphoreGrant::TryAcquire().

◆ wait()

void CSemaphore::wait ( )
inline

Definition at line 204 of file sync.h.

References condition, mutex, and value.

Referenced by CSemaphoreGrant::Acquire().

Member Data Documentation

◆ condition

std::condition_variable CSemaphore::condition
private

Definition at line 197 of file sync.h.

Referenced by post(), and wait().

◆ mutex

std::mutex CSemaphore::mutex
private

Definition at line 198 of file sync.h.

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

◆ value

int CSemaphore::value
private

Definition at line 199 of file sync.h.

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


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