Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/sync-barrier.hpp"
A one time N-fold mutual synchronisation barrier.
Calls to #sync() will block until N such calls occurred.
yield()
loop, increasing load at the OS scheduler, possibly starving the system when stretched out over extended time. Definition at line 73 of file sync-barrier.hpp.
Public Member Functions | |
SyncBarrier (uint nFold=2) | |
void | sync () |
Private Attributes | |
std::atomic_int | latch_ |
Additional Inherited Members | |
Private Member Functions inherited from NonCopyable | |
NonCopyable (NonCopyable const &)=delete | |
NonCopyable & | operator= (NonCopyable const &)=delete |
|
inlineexplicit |
nFold | the number of participants to sync (min. 2) |
Definition at line 81 of file sync-barrier.hpp.