Constructs a grant bound to a semaphore, optionally acquiring without blocking.
Synopsis
Declared in <semaphore_grant.h>
explicit
CountingSemaphoreGrant(
std::counting_semaphore<LeastMaxValue>& sema,
bool fTry = false) noexcept;
Parameters
Name |
Description |
sema |
The semaphore to acquire a slot from. |
fTry |
If true, try to acquire without blocking; otherwise block until acquired. |
Created with MrDocs