RAII‐style semaphore lock
Synopsis
Declared in <semaphore_grant.h>
template<std::ptrdiff_t LeastMaxValue = std::counting_semaphore<>::max()>
class CountingSemaphoreGrant;
Member Functions
Name |
Description |
|
Constructors |
|
Releases the held slot, if any, on destruction. |
Assignment operators |
|
Acquires the semaphore, blocking until a slot is available. |
|
Releases the held semaphore slot, if any. |
|
Attempts to acquire the semaphore without blocking. |
|
Reports whether this grant currently holds a semaphore slot. |
Created with MrDocs