12 #include <condition_variable>
29 void push(
const T &item);
35 std::condition_variable cond_;
43 std::unique_lock<std::mutex> mlock(mutex_);
45 while (queue_.empty()) {
49 auto item = queue_.front();
57 std::unique_lock<std::mutex> mlock(mutex_);
59 while (queue_.empty()) {
63 item = queue_.front();
70 std::unique_lock<std::mutex> mlock(mutex_);
80 std::unique_lock<std::mutex> mlock(mutex_);
82 queue_.push(std::move(item));
SyncQueue & operator=(const SyncQueue &)=delete
T pop()
Definition: syncqueue.h:41
void push(const T &item)
Definition: syncqueue.h:68
Definition: syncqueue.h:20