List of all members.
Detailed Description
Waits for a number of threads to reach a certain point (i.e. the call to Barrier::waitForAll). Once everyone has arrived, everyone is released.
Constructor & Destructor Documentation
| Threads::Barrier::Barrier |
( |
int |
nrthreads = -1, |
|
|
bool |
immediatrelease = true | |
|
) |
| | |
Member Function Documentation
| Mutex& Threads::Barrier::mutex |
( |
|
) |
[inline] |
| int Threads::Barrier::nrThreads |
( |
|
) |
const [inline] |
| void Threads::Barrier::releaseAll |
( |
|
) |
|
| void Threads::Barrier::releaseAllInternal |
( |
|
) |
[protected] |
| void Threads::Barrier::releaseAllNoLock |
( |
|
) |
|
| void Threads::Barrier::setNrThreads |
( |
int |
|
) |
|
| bool Threads::Barrier::waitForAll |
( |
bool |
unlock = true |
) |
|
- Returns:
- true if current thread is the first one to return. If immediaterelease_ is false, this thread has to release all other threads with releaseAll() or releaseAllNoLock().
- Parameters:
-
| unlock | If false, the mutex will still be locked when returning, and mutex().unLock() must be called to allow other threads to be released(). |
Member Data Documentation