Constructors
Declared in <semaphore_grant.h>
Constructs an empty grant that holds no semaphore slot.
CountingSemaphoreGrant() noexcept;
» more...
Copy construction is deleted; a grant uniquely owns its slot.
CountingSemaphoreGrant(CountingSemaphoreGrant const& other) = delete;
» more...
Move-constructs a grant, transferring ownership of the held slot.
CountingSemaphoreGrant(CountingSemaphoreGrant&& other) noexcept;
» more...
Constructs a grant bound to a semaphore, optionally acquiring without blocking.
explicit
CountingSemaphoreGrant(
std::counting_semaphore<LeastMaxValue>& sema,
bool fTry = false) noexcept;
» more...
| Name | Description |
|---|---|
| other | The grant to move from; left empty afterwards. |
| sema | The semaphore to acquire a slot from. |
| fTry | If true, try to acquire without blocking; otherwise block until acquired. |