std::counting_semaphore<LeastMaxValue>::~counting_semaphore
From cppreference.com
< cpp | thread | counting semaphore
~counting_semaphore(); |
(since C++20) | |
Destroys the counting_semaphore
object.
Preconditions
None, but see notes.
Notes
The current draft for C++20 does not specify the precondition for counting_semaphore
's destructor; it was removed by P1633R1.
Presumably, however, it would be dangerous to have any other threads still blocking on acquire(), try_acquire_for(), or try_acquire_until() calls when the counting_semaphore
destructor is called. counting_semaphore
's destructor is not like ~condition_variable() in that regard, for example.