the class barrier allows several threads to synchronize between them More...
#include <barrier.hpp>
Public Member Functions | |
barrier (unsigned int num) | |
The constructor. More... | |
~barrier () | |
The destructor. More... | |
void | wait () |
suspend the calling thread waiting for other up to 'num' other thread to call wait too More... | |
the class barrier allows several threads to synchronize between them
the number of thread to synchronize is given in the constructor argument 'num'. All thread calling the wait() method get locked until 'num' thread(s) have called this wait() method at which time they are all unlocked. The barrier object is then ready for a new cycle.
Definition at line 57 of file barrier.hpp.
libthreadar::barrier::barrier | ( | unsigned int | num | ) |
The constructor.
[in] | num | is the number of thread to synchronize |
libthreadar::barrier::~barrier | ( | ) |
The destructor.
void libthreadar::barrier::wait | ( | ) |
suspend the calling thread waiting for other up to 'num' other thread to call wait too