Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
RAII-style semaphore lock. More...
#include <sync.h>
Collaboration diagram for CSemaphoreGrant: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 | |
| CSemaphore * | sem |
| bool | fHaveGrant |
Detailed Description
Constructor & Destructor Documentation
◆ CSemaphoreGrant() [1/2]
◆ CSemaphoreGrant() [2/2]
|
inlineexplicit |
Definition at line 271 of file sync.h.
References Acquire(), and TryAcquire().
◆ ~CSemaphoreGrant()
|
inline |
Member Function Documentation
◆ Acquire()
|
inline |
Definition at line 238 of file sync.h.
References fHaveGrant, sem, and CSemaphore::wait().
Referenced by CSemaphoreGrant().
◆ MoveTo()
|
inline |
Definition at line 261 of file sync.h.
References fHaveGrant, Release(), and sem.
Referenced by CConnman::OpenNetworkConnection().
◆ operator bool()
|
inline |
Definition at line 284 of file sync.h.
References fHaveGrant.
◆ Release()
|
inline |
Definition at line 246 of file sync.h.
References fHaveGrant, CSemaphore::post(), and sem.
Referenced by CConnman::DisconnectNodes(), MoveTo(), and ~CSemaphoreGrant().
◆ TryAcquire()
|
inline |
Definition at line 254 of file sync.h.
References fHaveGrant, sem, and CSemaphore::try_wait().
Referenced by CSemaphoreGrant(), and CConnman::ThreadOpenAddedConnections().
Member Data Documentation
◆ fHaveGrant
|
private |
Definition at line 235 of file sync.h.
Referenced by Acquire(), MoveTo(), operator bool(), Release(), and TryAcquire().
◆ sem
|
private |
The documentation for this class was generated from the following file:
- src/sync.h

