10template <std::ptrdiff_t LeastMaxValue>
counting_semaphore(std::ptrdiff_t desired) noexcept
Constructs semaphore with initial token count.
void release() noexcept
Releases one token.
bool try_acquire_for(const roo_time::Duration &duration) noexcept
Attempts to acquire a token for a bounded duration.
bool try_acquire() noexcept
Attempts to acquire a token without blocking.
counting_semaphore & operator=(const counting_semaphore &)=delete
void acquire() noexcept
Acquires a token, blocking until one is available.
bool try_acquire_until(const roo_time::Uptime &when) noexcept
Attempts to acquire a token until the given deadline.
counting_semaphore(const counting_semaphore &)=delete