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

Method call_handler

example/cpp11/executors/actor.cpp:158–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156 // Find the matching message handlers, if any, and call them.
157 template <class Message>
158 void call_handler(Message msg, actor_address from)
159 {
160 const std::type_info& message_id = typeid(Message);
161 for (auto& h: handlers_)
162 {
163 if (h->message_id() == message_id)
164 {
165 auto mh = static_cast<message_handler<Message>*>(h.get());
166 mh->handle_message(msg, from);
167 }
168 }
169 }
170
171 // All messages associated with a single actor object should be processed
172 // non-concurrently. We use a strand to ensure non-concurrent execution even

Callers 2

sendMethod · 0.45
tail_sendMethod · 0.45

Calls 2

getMethod · 0.45
handle_messageMethod · 0.45

Tested by

no test coverage detected