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

Method pop

example/cpp11/executors/pipeline.cpp:156–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154 }
155
156 bool pop(T& t)
157 {
158 std::unique_lock<std::mutex> lock(impl_->mutex_);
159 while (impl_->queue_.empty() && !impl_->stop_)
160 impl_->condition_.wait(lock);
161 if (!impl_->queue_.empty())
162 {
163 t = impl_->queue_.front();
164 impl_->queue_.pop();
165 return true;
166 }
167 return false;
168 }
169
170private:
171 std::shared_ptr<queue_impl<T>> impl_;

Callers 6

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

Calls 3

frontMethod · 0.80
emptyMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected