3 #include "utilities/threading_policies.h" 6 #include <experimental/optional> 10 template <
typename ThreadingPolicy,
typename T>
15 void push(value_type value) {
16 const auto lck = threading_policy_.get_lock();
17 queue_.push(std::move(value));
20 std::experimental::optional<value_type> pop() {
21 const auto lck = threading_policy_.get_lock();
23 return std::experimental::nullopt;
25 auto ret = std::move(queue_.front());
31 const auto lck = threading_policy_.get_lock();
32 queue_ = std::queue<value_type>{};
36 ThreadingPolicy threading_policy_;
37 std::queue<value_type> queue_;
Definition: allocator.h:6
Definition: threaded_queue.h:11