MCPcopy Create free account
hub / github.com/decoder-it/ADCSCoercePotato / try_pop

Method try_pop

BlockingQueue.h:14–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12 condition.notify_one();
13 }
14 bool try_pop(ITEM& value) { // non-blocking pop
15 std::lock_guard<Mutex> lock(mutex);
16 if (queue.empty()) return false;
17 value = std::move(queue.front());
18 queue.pop();
19 return true;
20 }
21 ITEM wait_pop() { // blocking pop
22 std::unique_lock<Mutex> lock(mutex);
23 condition.wait(lock, [this] {return !queue.empty(); });

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.80

Tested by

no test coverage detected