MCPcopy Create free account
hub / github.com/MaskRay/ccls / push

Method push

src/threaded_queue.hh:85–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83
84 // Add an element to the queue.
85 template <void (std::deque<T>::*Push)(T &&)> void push(T &&t, bool priority) {
86 std::lock_guard<std::mutex> lock(mutex_);
87 if (priority)
88 (priority_.*Push)(std::move(t));
89 else
90 (queue_.*Push)(std::move(t));
91 ++total_count_;
92 waiter_->cv.notify_one();
93 }
94
95 void pushBack(T &&t, bool priority = false) { push<&std::deque<T>::push_back>(std::move(t), priority); }
96

Callers 1

flattenHierarchyFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected