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

Method wait

example/cpp11/executors/actor.cpp:191–198  ·  view source on GitHub ↗

Block until a message has been received.

Source from the content-addressed store, hash-verified

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

Callers 10

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

Calls 2

frontMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected