Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
Finish
Method · 0.80
UNIT_TEST
Function · 0.80
Calls
3
front
Method · 0.80
pop
Method · 0.80
empty
Method · 0.45
Tested by
1
UNIT_TEST
Function · 0.64