Bitcoin ABC  0.29.2
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
CSemaphore Class Reference

#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 363 of file sync.h.

Constructor & Destructor Documentation

◆ CSemaphore()

CSemaphore::CSemaphore ( int  init)
inlineexplicit

Definition at line 370 of file sync.h.

Member Function Documentation

◆ post()

void CSemaphore::post ( )
inline

Definition at line 387 of file sync.h.

Here is the caller graph for this function:

◆ try_wait()

bool CSemaphore::try_wait ( )
inline

Definition at line 378 of file sync.h.

Here is the caller graph for this function:

◆ wait()

void CSemaphore::wait ( )
inline

Definition at line 372 of file sync.h.

Here is the caller graph for this function:

Member Data Documentation

◆ condition

std::condition_variable CSemaphore::condition
private

Definition at line 365 of file sync.h.

◆ mutex

std::mutex CSemaphore::mutex
private

Definition at line 366 of file sync.h.

◆ value

int CSemaphore::value
private

Definition at line 367 of file sync.h.


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