Commit 69ea9979 authored by Marian Triebe's avatar Marian Triebe

Add overload for `weak_actor_ptr` to `anon_send_exit`

parent 48390d6a
...@@ -91,6 +91,13 @@ inline void anon_send_exit(const actor_addr& to, exit_reason reason) { ...@@ -91,6 +91,13 @@ inline void anon_send_exit(const actor_addr& to, exit_reason reason) {
anon_send_exit(ptr, reason); anon_send_exit(ptr, reason);
} }
/// Anonymously sends `to` an exit message.
inline void anon_send_exit(const weak_actor_ptr& to, exit_reason reason) {
auto ptr = actor_cast<strong_actor_ptr>(to);
if (ptr)
anon_send_exit(ptr, reason);
}
} // namespace caf } // namespace caf
#endif // CAF_SEND_HPP #endif // CAF_SEND_HPP
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment