Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#8518 closed Feature Requests (fixed)

Sync: Add a latch class

Reported by: viboes Owned by: viboes
Milestone: Boost 1.56.0 Component: thread
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:

Description

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

implement a latch class that could have the following interface

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

        latch(std::size_t count);
        ~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);
    };

Change History (5)

comment:1 by viboes, 9 years ago

Owner: changed from Anthony Williams to viboes
Status: newassigned

comment:2 by viboes, 9 years ago

Milestone: To Be DeterminedBoost 1.55.0

comment:3 by viboes, 9 years ago

Milestone: Boost 1.55.0Boost 1.56.0

comment:5 by anonymous, 8 years ago

[Testtt] www.sisiremaja.com

Note: See TracTickets for help on using tickets.