14 std::unique_lock<std::mutex>
const lock(m_mutex);
22 std::unique_lock<std::mutex> lock(m_mutex);
24 m_cond.wait(lock, [
this]() {
return !m_queue.empty(); });
26 T item = m_queue.front();
32 auto empty() ->
bool {
33 std::unique_lock<std::mutex>
const lock(m_mutex);
35 return m_queue.empty();
39 std::queue<T> m_queue;
41 std::condition_variable m_cond;