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

Method call_handler

example/cpp14/executors/actor.cpp:157–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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