20 #ifndef BLOCKINGQUEUE_H_4LEVMY0N
21 #define BLOCKINGQUEUE_H_4LEVMY0N
25 #include <condition_variable>
36 virtual void push(
const T& elem) {
37 std::lock_guard<std::mutex> lock(_mutex);
38 _queue.push_back(elem);
42 virtual void push_front(
const T& elem) {
43 std::lock_guard<std::mutex> lock(_mutex);
44 _queue.push_front(elem);
49 std::lock_guard<std::mutex> lock(_mutex);
51 while (_queue.empty()) {
54 T ret = _queue.front();
59 virtual void clear() {
60 std::lock_guard<std::mutex> lock(_mutex);
64 virtual bool isEmpty() {
65 std::lock_guard<std::mutex> lock(_mutex);
66 return _queue.empty();
71 std::condition_variable_any _cond;
Definition: Breakpoint.cpp:26
Definition: BlockingQueue.h:30