MCPcopy Create free account
hub / github.com/celtera/libremidi / try_dequeue

Method try_dequeue

examples/multithread_midiout.cpp:40–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 }
39
40 bool try_dequeue(T& t)
41 {
42 std::scoped_lock lock{m_mutex};
43 if (!m_data.empty())
44 {
45 t = std::move(m_data.front());
46 m_data.pop_front();
47 return true;
48 }
49 return false;
50 }
51
52private:
53 std::mutex m_mutex;

Callers 5

pollMethod · 0.80
pollMethod · 0.80
pollMethod · 0.80
mainFunction · 0.80
send_messageFunction · 0.80

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected