28 #ifndef STDCASA_THREAD_BARRIER_H_
29 #define STDCASA_THREAD_BARRIER_H_
31 #include <condition_variable>
42 std::unique_lock<std::mutex> lock(
mutex_);
59 explicit Barrier(std::size_t iCount) :
66 auto lGen = mGeneration;
67 std::unique_lock<std::mutex> lLock{mMutex};
73 mCond.wait(lLock, [
this, lGen] {
return lGen != mGeneration; });
79 std::condition_variable mCond;
80 std::size_t mThreshold;
82 std::size_t mGeneration;
Barrier(std::size_t count)
std::condition_variable cvar_