void local_actor::forward_message(const actor_ptr& dest, message_priority p) { if (dest == nullptr) return; auto& id = m_current_node->mid; dest->enqueue({last_sender(), dest, id, p}, m_current_node->msg); // treat this message as asynchronous message from now on id = message_id{}; }
inline void operator()(const actor_ptr& sender, const message_id& mid) const { CPPA_REQUIRE(rsn != exit_reason::not_exited); if (mid.is_request() && sender != nullptr) { sender->enqueue({nullptr, sender, mid.response_id()}, make_any_tuple(atom("EXITED"), rsn)); } }
void local_actor::forward_message(const actor_ptr& new_receiver) { if (new_receiver == nullptr) { return; } auto& from = last_sender(); auto id = m_current_node->mid; if (id.valid() == false || id.is_response()) { new_receiver->enqueue(from.get(), m_current_node->msg); } else { new_receiver->sync_enqueue(from.get(), id, m_current_node->msg); // treat this message as asynchronous message from now on m_current_node->mid = message_id_t(); } }