std::counting_semaphore<LeastMaxValue>::~counting_semaphore
來自 cppreference.com
< cpp | thread | counting semaphore (計數訊號量)
~counting_semaphore(); |
(C++20 起) | |
銷燬 counting_semaphore
物件。
[編輯章節:備註] 備註
只有在所有執行緒都已收到通知的情況下,呼叫解構函式才是安全的。程式設計師必須確保一旦解構函式開始執行,沒有執行緒嘗試在 *this 上等待。解構函式不會通知並釋放任何等待中的執行緒。