Boost logo

Boost :

Subject: Re: [boost] [thread] countdown_latch
From: Michael Marcin (mike.marcin_at_[hidden])
Date: 2013-05-09 02:33:21

Just came across

C++ Latches and Barriers


The synopsis is as follows.

class latch {
   explicit latch(size_t count);

   void count_down();

   void wait();

   bool try_wait();

   void count_down_and_wait();

class barrier {
   explicit barrier(size_t num_threads) throw (std::invalid_argument);
   explicit barrier(size_t num_threads, std::function<void()> f) throw

   void count_down_and_wait();

   void reset(size_t num_threads);
   void reset(function f);

Boost list run by bdawes at, gregod at, cpdaniel at, john at