std::experimental::latch:: count_down_and_wait
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 | ||||
std::experimental::latch
|
latch::count_down_and_wait
|
||||
|
void
count_down_and_wait
(
)
;
|
(1) | (concurrency TS) |
以原子方式将内部计数器递减
1
,并在必要时阻塞调用线程直至计数器归零。
如果内部计数器已经为零,则行为未定义。
此操作
与
所有在此latch上阻塞的调用以及所有在此latch上返回
true
的
is_ready
调用实现同步。
参数
(无)
返回值
(无)
异常
不抛出任何异常。