MCPcopy Create free account
hub / github.com/boostorg/asio / pop

Method pop

example/cpp14/executors/pipeline.cpp:139–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137 }
138
139 bool pop(T& t)
140 {
141 std::unique_lock<std::mutex> lock(impl_->mutex_);
142 while (impl_->queue_.empty() && !impl_->stop_)
143 impl_->condition_.wait(lock);
144 if (!impl_->queue_.empty())
145 {
146 t = impl_->queue_.front();
147 impl_->queue_.pop();
148 return true;
149 }
150 return false;
151 }
152
153private:
154 std::shared_ptr<queue_impl<T>> impl_;

Callers 5

execute_nextMethod · 0.45
filterFunction · 0.45
upperFunction · 0.45
writerFunction · 0.45
runMethod · 0.45

Calls 3

frontMethod · 0.80
emptyMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected