1 #ifndef theplu_yat_utility_queue 2 #define theplu_yat_utility_queue 23 #include "BasicQueue.h" 25 #include "yat_assert.h" 27 #include <boost/thread.hpp> 88 void pop_impl(T& value, boost::unique_lock<boost::mutex>& lock)
90 YAT_ASSERT(this->
q_.size());
96 void push_impl(
const T& value, boost::unique_lock<boost::mutex>& lock)
98 this->
q_.push_back(value);
102 #ifdef YAT_HAVE_RVALUE 103 void push_impl(T&& value, boost::unique_lock<boost::mutex>& lock)
105 this->
q_.push_back(std::move(value));
The Department of Theoretical Physics namespace as we define it.
Some useful functions are placed here.
Multi-thread safe queue.
Definition: Queue.h:61
void assign(const BasicQueue &other)
Definition: BasicQueue.h:168
Queue(const Queue &other)
Copy constructor.
Definition: Queue.h:75
Definition: BasicQueue.h:34
#define YAT_MOVE_IF_NOEXCEPT(arg)
if rvalue not available, do nothing
Definition: utility.h:352
std::deque< T > q_
data
Definition: BasicQueue.h:184
Queue & operator=(const Queue &lhs)
assignment operator
Definition: Queue.h:81