1 #ifndef theplu_yat_utility_queue 2 #define theplu_yat_utility_queue 21 #include "BasicQueue.h" 23 #include "yat_assert.h" 85 void pop_impl(T& value, std::unique_lock<std::mutex>& lock)
87 YAT_ASSERT(this->
q_.size());
88 value = std::move_if_noexcept(this->
q_.front());
93 void push_impl(
const T& value, std::unique_lock<std::mutex>& lock)
95 this->
q_.push_back(value);
99 void push_impl(T&& value, std::unique_lock<std::mutex>& lock)
101 this->
q_.push_back(std::move(value));
The Department of Theoretical Physics namespace as we define it.
Some useful functions are placed here.
Definition: stl_utility.h:64
Multi-thread safe queue.
Definition: Queue.h:58
void assign(const BasicQueue &other)
Definition: BasicQueue.h:256
Queue(const Queue &other)
Copy constructor.
Definition: Queue.h:72
Definition: BasicQueue.h:36
std::deque< T > q_
data
Definition: BasicQueue.h:273
Queue & operator=(const Queue &lhs)
assignment operator
Definition: Queue.h:78