std::experimental::latch:: count_down
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
|
||||
|
void
count_down
(
ptrdiff_t n
=
1
)
;
|
(1) | (并发技术规范) |
以原子方式将内部计数器递减 n 而不阻塞调用者。
如果 n 大于内部计数器的值或为负数,则行为未定义。
此操作 与 所有在此latch上阻塞的调用以及所有对此latch的 is_ready 调用(返回 true 的调用)实现同步。
参数
| n | - | 内部计数器减少的数值 |
返回值
(无)
异常
不抛出任何异常。