diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-12-05 15:11:01 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-12-05 15:11:01 +0900 |
commit | 3fdc3e5ee96dca5b11d1694975a65200787eab86 (patch) | |
tree | 5c1733853892b8397d67706fa453a9bd978d2102 /boost/thread/concurrent_queues/sync_priority_queue.hpp | |
parent | 88e602c57797660ebe0f9e15dbd64c1ff16dead3 (diff) | |
download | boost-3fdc3e5ee96dca5b11d1694975a65200787eab86.tar.gz boost-3fdc3e5ee96dca5b11d1694975a65200787eab86.tar.bz2 boost-3fdc3e5ee96dca5b11d1694975a65200787eab86.zip |
Imported Upstream version 1.66.0upstream/1.66.0
Diffstat (limited to 'boost/thread/concurrent_queues/sync_priority_queue.hpp')
-rw-r--r-- | boost/thread/concurrent_queues/sync_priority_queue.hpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/boost/thread/concurrent_queues/sync_priority_queue.hpp b/boost/thread/concurrent_queues/sync_priority_queue.hpp index d604faa742..a556910cd6 100644 --- a/boost/thread/concurrent_queues/sync_priority_queue.hpp +++ b/boost/thread/concurrent_queues/sync_priority_queue.hpp @@ -1,5 +1,5 @@ // Copyright (C) 2014 Ian Forbed -// Copyright (C) 2014 Vicente J. Botet Escriba +// Copyright (C) 2014-2017 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -130,8 +130,10 @@ namespace concurrent void pull(ValueType&); - queue_op_status pull_until(const clock::time_point&, ValueType&); - queue_op_status pull_for(const clock::duration&, ValueType&); + template <class WClock, class Duration> + queue_op_status pull_until(const chrono::time_point<WClock,Duration>&, ValueType&); + template <class Rep, class Period> + queue_op_status pull_for(const chrono::duration<Rep,Period>&, ValueType&); queue_op_status try_pull(ValueType& elem); queue_op_status wait_pull(ValueType& elem); @@ -273,8 +275,9 @@ namespace concurrent ////////////////////// template <class T, class Cont,class Cmp> + template <class WClock, class Duration> queue_op_status - sync_priority_queue<T,Cont,Cmp>::pull_until(const clock::time_point& tp, T& elem) + sync_priority_queue<T,Cont,Cmp>::pull_until(const chrono::time_point<WClock,Duration>& tp, T& elem) { unique_lock<mutex> lk(super::mtx_); if (queue_op_status::timeout == super::wait_until_not_empty_until(lk, tp)) @@ -285,8 +288,9 @@ namespace concurrent ////////////////////// template <class T, class Cont,class Cmp> + template <class Rep, class Period> queue_op_status - sync_priority_queue<T,Cont,Cmp>::pull_for(const clock::duration& dura, T& elem) + sync_priority_queue<T,Cont,Cmp>::pull_for(const chrono::duration<Rep,Period>& dura, T& elem) { return pull_until(clock::now() + dura, elem); } |