The barrier
class is a
simple barrier for N threads. The number of participating
threads is specified in the constructor. The first N
threads to call either std::experimental::barrier::arrive_and_wait
or std::experimental::barrier::arrive_and_drop
form the set of
participating threads.
class barrier{ public: explicit barrier(ptrdiff_t num_threads); ~barrier(); barrier(barrier const&)=delete; barrier& operator=(barrier const&)=delete; void arrive_and_drop(); void arrive_and_wait(); };
#include <experimental/barrier>