Block until all thread have arrived at the barrier.
- Copyright
- (C) 2009 Radon Labs GmbH (C) 2013-2020 Individual contributors, see AUTHORS file
bool Win32::Win32ThreadBarrier::Arrive |
( |
| ) |
|
|
inline |
enter thread barrier, return false if not all threads have arrived yet
Notify arrival at thread-sync point, return false if not all threads have arrived yet, and true if all threads have arrived.
If the method returns false, you should immediately call Wait(), if the method returns true, the caller has a chance to perform some actions which should happen before threads continue, and then call the SignalContinue() method.
void Win32::Win32ThreadBarrier::Wait |
( |
| ) |
|
|
inline |
call after Arrive() returns false to wait for other threads
This method should be called when Arrive() returns false.
It will put the thread to sleep because not all threads have arrived yet. When the method returns, all threads have arrived at the sync point.
NOTE: sometimes both the render and the main thread arrive here with the outstandingThreads member set to 1 (from two) causing both thread to be waiting idefinitely.