std::counting_semaphore<LeastMaxValue>:: ~counting_semaphore
From cppreference.net
<
cpp
|
thread
|
counting semaphore
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::counting_semaphore
| Member functions | ||||
|
counting_semaphore::~counting_semaphore
|
||||
| Operations | ||||
| Constants | ||||
|
~counting_semaphore
(
)
;
|
(自 C++20 起) | |
销毁
counting_semaphore
对象。
注释
只有在所有线程都已被通知的情况下调用析构函数才是安全的。程序员必须确保一旦析构函数开始执行,没有线程会尝试在 * this 上等待。析构函数不会通知并释放任何等待中的线程。