MCPcopy Create free account
hub / github.com/comaps/comaps / TryPop

Method TryPop

libs/base/thread_safe_queue.hpp:46–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 }
45
46 bool TryPop(T & value)
47 {
48 std::lock_guard lk(m_mutex);
49 if (m_queue.empty())
50 return false;
51
52 value = std::move(m_queue.front());
53 m_queue.pop();
54 return true;
55 }
56
57 bool Empty() const
58 {

Callers 2

FinishMethod · 0.80
UNIT_TESTFunction · 0.80

Calls 3

frontMethod · 0.80
popMethod · 0.80
emptyMethod · 0.45

Tested by 1

UNIT_TESTFunction · 0.64