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

Method wait

example/cpp14/executors/actor.cpp:190–197  ·  view source on GitHub ↗

Block until a message has been received.

Source from the content-addressed store, hash-verified

188
189 // Block until a message has been received.
190 Message wait()
191 {
192 std::unique_lock<std::mutex> lock(mutex_);
193 condition_.wait(lock, [this]{ return !message_queue_.empty(); });
194 Message msg(std::move(message_queue_.front()));
195 message_queue_.pop_front();
196 return msg;
197 }
198
199private:
200 // Handle a new message by adding it to the queue and waking a waiter.

Callers 15

~bank_accountMethod · 0.45
fork_join_poolMethod · 0.45
~fork_join_poolMethod · 0.45
joinMethod · 0.45
popMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45
runMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45
deadline_timer_testFunction · 0.45

Calls 2

frontMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected