std::experimental::flex_barrier

From cppreference.com
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
Defined in header <experimental/barrier>
class flex_barrier;
(concurrency TS)

The class std::experimental::flex_barrier provides a thread-coordination mechanism that allows a set of participating threads to block until an operation is completed. Unlike std::experimental::latch

A barrier has a completion phase, which is executed by one of the participating threads once all threads in the set of participating threads arrive at the synchronization point. The arrive_and_wait and arrive_and_drop calls synchronize with

std::experimental::flex_barrier N, and consists of the next N

Users who do not need this functionality can use std::experimental::barrier.

Member functions

constructs a flex_barrier
(public member function)
destroys the flex_barrier
(public member function)
operator=
[deleted]
not copy-assignable
(public member function)
arrive at the synchronization point and block
(public member function)
arrive at the synchronization point and remove the current thread from the set of participating threads
(public member function)