24 #include <condition_variable>
31 #ifndef DOXYGEN_SHOULD_SKIP_THIS
53 std::unique_lock<std::mutex> lock(m_mutex);
55 if (m_queue.empty()) {
59 value = m_queue.front();
69 void push(
const T& value) {
70 std::unique_lock<std::mutex> lock(m_mutex);
71 m_queue.push_back(value);
78 std::unique_lock<std::mutex> lock(m_mutex);
84 std::deque<T> m_queue;
87 #ifndef DOXYGEN_SHOULD_SKIP_THIS
void push(const T &value)
Push a value on the queue.
Definition: Queue.h:69
A simple concurrent queue.
Definition: Queue.h:44
bool poll(T &value)
Poll a value from the queue, if possible.
Definition: Queue.h:52
void clear()
Clear the queue.
Definition: Queue.h:77
#define GF_API
Definition: Portability.h:35