Sync: Add a latch class
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)
Owner: |
changed from Anthony Williams to viboes
|
Status: |
new → assigned
|
Milestone: |
To Be Determined → Boost 1.55.0
|
Milestone: |
Boost 1.55.0 → Boost 1.56.0
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
https://github.com/boostorg/thread/commit/750c849b0f0dff79a289111955260a4147ac7f59