A synchronising barrier that can be configured for an arbitrary number of threads. More...
#include <CyclicBarrier.hpp>
Public Member Functions | |
CyclicBarrier (unsigned int count_) | |
Create a cyclic barrier with the specified count. More... | |
void | countdown () |
Count down the barrier, blocking if the count has not reached 0. More... | |
void | reconfigure (unsigned int count_) |
Reconfigure the latch to count the specified number of times. More... | |
A synchronising barrier that can be configured for an arbitrary number of threads.
The barrier automatically resets after releasing the threads.
The barrier can be reconfigured for a different number of threads. It is the responsibility of the using code to ensure that the barrier is not being used when reconfigured.
|
inlineexplicit |
Create a cyclic barrier with the specified count.
void countdown | ( | ) |
Count down the barrier, blocking if the count has not reached 0.
|
inline |
Reconfigure the latch to count the specified number of times.
It is the responsibility of the caller to ensure that the countdown latch is not being used at the time of the reconfiguration.