| 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 |
no test coverage detected