MCPcopy Create free account
hub / github.com/Lwhyz/workspace / try_pop

Method try_pop

include/workspace/taskqueue.hpp:42–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40 q.emplace_front(std::move(v));
41 }
42 bool try_pop(T& tmp) {
43 std::lock_guard<std::mutex> lock(tq_lok);
44 if (!q.empty()) {
45 tmp = std::move(q.front());
46 q.pop_front();
47 return true;
48 }
49 return false;
50 }
51 size_type length() {
52 std::lock_guard<std::mutex> lock(tq_lok);
53 return q.size();

Callers 1

missionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected