Bitcoin Core  0.21.1
P2P Digital Currency
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules
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 259 of file sync.h.

Constructor & Destructor Documentation

CSemaphore::CSemaphore ( int  init)
inlineexplicit

Definition at line 267 of file sync.h.

Member Function Documentation

void CSemaphore::post ( )
inline

Definition at line 285 of file sync.h.

Here is the caller graph for this function:

bool CSemaphore::try_wait ( )
inline

Definition at line 276 of file sync.h.

Here is the caller graph for this function:

void CSemaphore::wait ( )
inline

Definition at line 269 of file sync.h.

Here is the caller graph for this function:

Member Data Documentation

std::condition_variable CSemaphore::condition
private

Definition at line 262 of file sync.h.

std::mutex CSemaphore::mutex
private

Definition at line 263 of file sync.h.

int CSemaphore::value
private

Definition at line 264 of file sync.h.


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