cpp/experimental/barrier

The class provides a thread-coordination mechanism that allows a set of participating threads to block until an operation is completed. Unlike std, barriers are reusable; once the participating threads are released from a barrier's synchronization point, they can reuse the same barrier.

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 and  calls synchronize with the start of the completion phase; the end of the completion phase synchronizes with the returns from all calls blocked by its completion.

For, the completion phase is empty. std allows the user to control the completion phase with a function object.

The set of participating threads for a constructed for  threads is the first  threads to arrive at its synchronization point after construction. The same set of threads (except for threads that called ) must arrive at the each cycle.