Class Barrier¶
Defined in File utils.h
Class Documentation¶
-
class
switchml::Barrier¶ A class that implements a simple thread barrier. Simply create an instance that is visible to using threads then from each thread call the wait function.
Public Functions
-
Barrier(const int num_participants)¶ Construct a new Barrier object.
- Parameters
num_participants – [in] Number of threads that will use the barrier
-
void
Wait()¶ Block the thread until all other participating threads arrive at the barrier.
-
void
Destroy()¶ Wakeup all waiting threads and make this barrier unusable.
-