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/detail/sync_queue_base.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/detail/sync_queue_base.hpp')
-rw-r--r-- | boost/thread/concurrent_queues/detail/sync_queue_base.hpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/boost/thread/concurrent_queues/detail/sync_queue_base.hpp b/boost/thread/concurrent_queues/detail/sync_queue_base.hpp index 653e273f8b..6ecb8211e3 100644 --- a/boost/thread/concurrent_queues/detail/sync_queue_base.hpp +++ b/boost/thread/concurrent_queues/detail/sync_queue_base.hpp @@ -3,7 +3,7 @@ ////////////////////////////////////////////////////////////////////////////// // -// (C) Copyright Vicente J. Botet Escriba 2013-2014. Distributed under the Boost +// (C) Copyright Vicente J. Botet Escriba 2013-2017. 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) // @@ -17,9 +17,7 @@ #include <boost/thread/mutex.hpp> #include <boost/thread/concurrent_queues/queue_op_status.hpp> -#include <boost/chrono/duration.hpp> #include <boost/chrono/time_point.hpp> -#include <boost/chrono/system_clocks.hpp> #include <boost/throw_exception.hpp> #include <boost/config/abi_prefix.hpp> @@ -40,10 +38,6 @@ namespace detail typedef typename Queue::size_type size_type; typedef queue_op_status op_status; - typedef typename chrono::steady_clock clock; - typedef typename clock::duration duration; - typedef typename clock::time_point time_point; - // Constructors/Assignment/Destructors BOOST_THREAD_NO_COPYABLE(sync_queue_base) inline sync_queue_base(); @@ -92,7 +86,8 @@ namespace detail inline void wait_until_not_empty(unique_lock<mutex>& lk); inline bool wait_until_not_empty_or_closed(unique_lock<mutex>& lk); - inline queue_op_status wait_until_not_empty_until(unique_lock<mutex>& lk, time_point const&); + template <class WClock, class Duration> + queue_op_status wait_until_not_empty_until(unique_lock<mutex>& lk, chrono::time_point<WClock,Duration> const&); inline void notify_not_empty_if_needed(unique_lock<mutex>& ) { @@ -203,7 +198,8 @@ namespace detail } template <class ValueType, class Queue> - queue_op_status sync_queue_base<ValueType, Queue>::wait_until_not_empty_until(unique_lock<mutex>& lk, time_point const&tp) + template <class WClock, class Duration> + queue_op_status sync_queue_base<ValueType, Queue>::wait_until_not_empty_until(unique_lock<mutex>& lk, chrono::time_point<WClock,Duration> const&tp) { for (;;) { |