MCPcopy Create free account
hub / github.com/caozhiyi/CppNet / Pop

Method Pop

base/TaskQueue.h:37–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 }
36
37 T Pop() {
38 std::unique_lock<std::mutex> lock(_block_mutex);
39 _empty_notify.wait(_block_mutex, [this]() {return !this->_block_queue.empty(); });
40 T ret = std::move(_block_queue.back());
41 _block_queue.pop_back();
42 _full_notify.notify_all();
43 return std::move(ret);
44 }
45
46 void Clear(bool notify = true) {
47 std::unique_lock<std::mutex> lock(_block_mutex);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected