![]() |
Lumiera 0.pre.04~rc.1
»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 64 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 ()=default | |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable const &)=delete | |
| NonCopyable & | operator= (NonCopyable const &)=delete |
|
inlineexplicit |
| nFold | the number of participants to sync (min. 2) |
Definition at line 72 of file sync-barrier.hpp.
|
inline |
Definition at line 80 of file sync-barrier.hpp.
References SyncBarrier::latch_.
Referenced by TestThread::TestThread(), CallQueue_test::Worker::Worker(), SessionCommandFunction_test::perform_massivelyParallel(), SyncBarrier_test::run(), DispatcherLoop::runSessionThread(), and lib::test::threadBenchmark().
Here is the caller graph for this function:
|
private |
Definition at line 67 of file sync-barrier.hpp.
Referenced by SyncBarrier::sync().
Inheritance diagram for SyncBarrier:
Collaboration diagram for SyncBarrier: