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

Method PushFront

base/TaskQueue.h:30–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 }
29
30 void PushFront(const T& element) {
31 std::unique_lock<std::mutex> lock(_block_mutex);
32 _full_notify.wait(_block_mutex, [this]() {return this->_block_queue.size() < this->_list_size; });
33 _block_queue.push_front(element);
34 _empty_notify.notify_all();
35 }
36
37 T Pop() {
38 std::unique_lock<std::mutex> lock(_block_mutex);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected