![]() |
Public API Reference |
Barrier synchronization class. More...
#include <csutil/threading/barrier.h>
Public Member Functions | |
| Barrier (size_t maxCount) | |
| Initialize barrier with set max count. | |
| void | Reset () |
| Reset a barrier for reuse. | |
| bool | Wait () |
| Wait for all threads to have called Wait. | |
Barrier synchronization class.
A barrier is used to synchronize the execution streams of any number of threads. All threads calls Wait that will block until the set number of threads have called it.
| CS::Threading::Barrier::Barrier | ( | size_t | maxCount | ) | [inline] |
| void CS::Threading::Barrier::Reset | ( | ) | [inline] |
| bool CS::Threading::Barrier::Wait | ( | ) | [inline] |