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

Method Push

base/TaskQueue.h:23–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21 }
22
23 void Push(const T& element) {
24 std::unique_lock<std::mutex> lock(_block_mutex);
25 _full_notify.wait(_block_mutex, [this]() {return this->_block_queue.size() < this->_list_size; });
26 _block_queue.push_front(element);
27 _empty_notify.notify_all();
28 }
29
30 void PushFront(const T& element) {
31 std::unique_lock<std::mutex> lock(_block_mutex);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected