std::experimental::barrier::arrive_and_wait
| 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 |
| std::future extensions | ||||
| Latches and barriers | ||||
| Atomic smart pointers | ||||
barrier::arrive_and_wait | ||||
| void arrive_and_wait(); |
(concurrency TS) | |
Blocks and arrive at the barrier's synchronization point.
The behavior is undefined if the calling thread is not in the set of participating threads of this barrier.
Calls to arrive_and_wait synchronizes with the start of the completion phase of the barrier. The completion of the completion phase synchronizes with the return from the call.
Calls to arrive_and_drop and arrive_and_wait never introduce data races with themselves or each other.
[edit] Notes
It is safe for a thread to call either arrive_and_wait() or arrive_and_drop() immediately on return from this call. It's not necessary to ensure that all blocked threads have exited arrive_and_wait() before a thread calls it again.
The set of participating threads for a barrier constructed for num_threads threads is the first num_threads to arrive at its synchronization point. This set does not change from cycle to cycle, except for threads removed from the set due to arrive_and_drop() calls.
[edit] Exceptions
Throws nothing.
[edit] See also
| arrive at the synchronization point and remove the current thread from the set of participating threads (public member function) [edit] |