class template
std::counting_semaphore
- Header
<semaphore>- Draft
- [sema.cnt]
- Scope
std- cppreference
- std::counting_semaphore
Synopsis
template<ptrdiff_t LeastMaxValue = 9223372036854775807L>
class counting_semaphore;Member functions
| Name | Declaration |
|---|---|
counting_semaphoreconstructor · 2 overloads | counting_semaphore(const counting_semaphore& other) +1 more |
~counting_semaphoredestructor | ~counting_semaphore() |
operator=operator | counting_semaphore& operator=(const counting_semaphore& other) |
acquiremember function | void acquire() |
releasemember function | void release(ptrdiff_t update) |
try_acquiremember function | bool try_acquire() |
try_acquire_formember function template | bool try_acquire_for(const chrono::duration<Rep, Period>& rel_time) |
try_acquire_untilmember function template | bool try_acquire_until(const chrono::time_point<Clock, Duration>& abs_time) |
Static member functions
| Name | Declaration |
|---|---|
maxstatic member function | ptrdiff_t max() |