|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
| Operations | ||||
counting_semaphore::release | ||||
| Constants | ||||
void release(std::ptrdiff_t update=1); | (since C++20) | |
Atomically increments the internal counter by the value ofupdate. Any thread(s) waiting for the counter to be greater than0, such as due to being blocked inacquire, will subsequently be unblocked.
This operation strongly happens before invocations oftry_acquire that observe the result of the effects.
Contents |
Bothupdate>=0 andupdate<= max()- counter aretrue, wherecounter is the value of the internal counter.
| update | - | the amount to increment the internal counter by |
May throwstd::system_error.
| decrements the internal counter or blocks until it can (public member function)[edit] | |
| tries to decrement the internal counter without blocking (public member function)[edit] | |
| tries to decrement the internal counter, blocking for up to a duration time (public member function)[edit] | |
| tries to decrement the internal counter, blocking until a point in time (public member function)[edit] |