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