An extension trait for
Addrs that provides convenient methods to control associated actors’ lifecycle.
The actor must implement the
SignalHandler trait for these methods to work.
These methods are different from their context counterparts which have immediate effects. Instead, they are queued to the mailbox, subjecting to message sending and handling delays. Moreover, if the actor stops/terminates/panics before handling the signal, no actual operation will be performed.
There’s no guarantee how the actor may react to signals. A misbehaved actor may act completely different from your intention.
signals module for details.
Stop the actor associated with the address.
This method should have the same effect as ActorContext::stop.
Terminate the actor associated with the address.
This method should have the same effect as ActorContext::terminate.