Bitcoin
Public Member Functions | Private Attributes | List of all members
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 () const
 

Private Attributes

CSemaphoresem
 
bool fHaveGrant
 

Detailed Description

RAII-style semaphore lock

Constructor & Destructor Documentation

◆ CSemaphoreGrant() [1/2]

CSemaphoreGrant::CSemaphoreGrant ( )
inline

◆ CSemaphoreGrant() [2/2]

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

◆ ~CSemaphoreGrant()

CSemaphoreGrant::~CSemaphoreGrant ( )
inline

Member Function Documentation

◆ Acquire()

void CSemaphoreGrant::Acquire ( )
inline

◆ MoveTo()

void CSemaphoreGrant::MoveTo ( CSemaphoreGrant grant)
inline

◆ operator bool()

CSemaphoreGrant::operator bool ( ) const
inline

◆ Release()

void CSemaphoreGrant::Release ( )
inline

◆ TryAcquire()

bool CSemaphoreGrant::TryAcquire ( )
inline

Member Data Documentation

◆ fHaveGrant

bool CSemaphoreGrant::fHaveGrant
private

◆ sem

CSemaphore* CSemaphoreGrant::sem
private

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