Macro stakker::kill [−][src]
macro_rules! kill { ($actor:expr, $msg:literal) => { ... }; ($actor:expr, $fmt:literal $(, $arg:expr)*) => { ... }; ($actor:expr, $error:expr) => { ... }; }
Kill an actor
ⓘ
kill!(actor, "format...", fmt-args...); kill!(actor, "literal..."); kill!(actor, error);
This kills another actor asynchronously. The kill is deferred to
the main queue to execute as soon as possible. actor
must be an
ActorOwn
reference. It’s not possible to kill another actor
with a simple Actor
reference.
The first form creates a formatted string using format!
, and
passes it to ActorOwn::kill_string
. The second form passes
the given literal directly to ActorOwn::kill_str
. The third
form passes the given error expression directly to
ActorOwn::kill
.