Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/comaps/comaps
/ WaitAndPop
Method
WaitAndPop
libs/base/thread_safe_queue.hpp:38–44 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
36
}
37
38
void WaitAndPop(T & value)
39
{
40
std::unique_lock lk(m_mutex);
41
m_cond.wait(lk, [this] { return !m_queue.empty(); });
42
value = std::move(m_queue.front());
43
m_queue.pop();
44
}
45
46
bool TryPop(T & value)
47
{
Callers
4
Run
Method · 0.80
Emit
Method · 0.80
Finish
Method · 0.80
UNIT_TEST
Function · 0.80
Calls
4
wait
Method · 0.80
front
Method · 0.80
pop
Method · 0.80
empty
Method · 0.45
Tested by
1
UNIT_TEST
Function · 0.64