Sleeping Wombat Common Library  0.50.0
swCommonLibrary
Public Member Functions | Private Attributes | List of all members
sw::ThreadsBarrier Class Reference

Can block multiple threads and wait for signal. ThreadsBarrier is reusable. More...

#include <ThreadsBarrier.h>

Public Member Functions

 ThreadsBarrier (uint16 numThreads)
 
void ArriveAndWait ()
 

Private Attributes

std::mutex m_lock
 
std::condition_variable m_condVariable
 
Size m_generation
 
const uint32 m_numThreads
 
uint32 m_remain
 

Detailed Description

Can block multiple threads and wait for signal. ThreadsBarrier is reusable.

Implementation based on http://stackoverflow.com/questions/24465533/implementing-boostbarrier-in-c11

Todo:
Implement

The documentation for this class was generated from the following files: