MeVisLab Toolbox Reference
|
A barrier class that handles synchronization of multiple threads Thread-safety: This class is thread-safe. More...
#include <mlBarrier.h>
Public Member Functions | |
Barrier (unsigned int count=0) | |
Creates a barrier with initial count of threads to synchronize. | |
void | setNumberOfThreads (unsigned int count) |
Sets the number of threads that should synchronize with the wait call. | |
bool | wait () |
Waits for other threads to also wait. | |
A barrier class that handles synchronization of multiple threads Thread-safety: This class is thread-safe.
Definition at line 31 of file mlBarrier.h.
Creates a barrier with initial count
of threads to synchronize.
Sets the number of threads that should synchronize with the wait call.
Note: only set this when no threads are currently waiting for synchronization!
bool ml::Barrier::wait | ( | ) |
Waits for other threads to also wait.
Returns true for the thread that calls wait as last caller.