std::experimental::latch:: ~latch
From cppreference.net
<
cpp
|
experimental
|
latch
C++
Experimental
| Technical Specification | ||||
| Filesystem library (filesystem TS) | ||||
| Library fundamentals (library fundamentals TS) | ||||
| Library fundamentals 2 (library fundamentals TS v2) | ||||
| Library fundamentals 3 (library fundamentals TS v3) | ||||
| Extensions for parallelism (parallelism TS) | ||||
| Extensions for parallelism 2 (parallelism TS v2) | ||||
| Extensions for concurrency (concurrency TS) | ||||
| Extensions for concurrency 2 (concurrency TS v2) | ||||
| Concepts (concepts TS) | ||||
| Ranges (ranges TS) | ||||
| Reflection (reflection TS) | ||||
| Mathematical special functions (special functions TR) | ||||
| Experimental Non-TS | ||||
| Pattern Matching | ||||
| Linear Algebra | ||||
| std::execution | ||||
| Contracts | ||||
| 2D Graphics |
Extensions for concurrency
| std::future extensions | ||||
| Latches and barriers | ||||
| Atomic smart pointers | ||||
|
~latch
(
)
;
|
(并发技术规范) | |
销毁闩锁。
该行为是未定义的,如果线程在同步点被阻塞。
即使并非所有线程都已从
wait()
或
count_down_and_wait()
返回,只要内部计数器必须等于零,析构函数仍可能被调用。
析构函数可能会阻塞,直到所有线程从阻塞函数中返回。
在线程调用析构函数后,不允许任何线程在此闩锁上阻塞。