Re: [Boost-bugs] [Boost C++ Libraries] #8519: Synchro: Update class barrier with a completion function (was: Sync: Add a completion_latch class)

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8519: Synchro: Update class barrier with a completion function (was: Sync: Add a completion_latch class)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-06-16 16:20:41


#8519: Synchro: Update class barrier with a completion function
-------------------------------+----------------------
  Reporter: viboes | Owner: viboes
      Type: Feature Requests | Status: assigned
 Milestone: To Be Determined | Component: thread
   Version: Boost 1.54.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+----------------------
Description changed by viboes:

Old description:

> Based on the ideas in N3600- C++ Latches and Barriers http://www.open-
> std.org/jtc1/sc22/wg21/docs/papers/2013/n3600.html
>
> implement a completion_latch class that could have the following
> interface
>

> {{{
> class completion_latch
> {
> public:
> typedef 'implementation defined' completion_function;
>
> completion_latch(completion_latch const&) = delete;
> completion_latch& operator=(completion_latch const&) = delete;
>
> completion_latch(std::size_t count);
> template <typename F>
> completion_latch(std::size_t count, F&& funct);
> ~completion_latch();
>
> void wait();
> bool try_wait();
> template <class Rep, class Period>
> cv_status wait_for(const chrono::duration<Rep, Period>&
> rel_time);
> template <class lock_type, class Clock, class Duration>
> cv_status wait_until(const chrono::time_point<Clock, Duration>&
> abs_time);
> void count_down();
> void count_down_and_wait();
> void reset(std::size_t count);
> template <typename F>
> completion_function then(F&& funct);
> };
>
> }}}

New description:

 Based on the ideas in N3600- C++ Latches and Barriers http://www.open-
 std.org/jtc1/sc22/wg21/docs/papers/2013/n3600.html

 add a completion function associated to the class barrier


 {{{
     class barrier
     {
     public:
         barrier(barrier const&) = delete;
         barrier& operator=(barrier const&) = delete;

         barrier(unsigned int count);
         template <typename F>
         barrier(unsigned int count, F&&);

         ~barrier();

         bool wait();
         void count_down_and_wait();
     };


 }}}

--
-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8519#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC