Skip to content

What's the difference between Actor.stop, Actor.exit_after, and Actor.kill? #161

Closed Answered by slawlor
phil-skillwon asked this question in Q&A
Discussion options

You must be logged in to vote
  • stop stops the actor from processing future messages, but will finish the current message. This is a "graceful" stop
  • kill will stop the actor at the next async await point, which can interrupt current message processing. This is a "forceful" stop
  • exit_after will simply send the stop message after some delay, and can be used to schedule a stop operation. There's a similar kill_after which sends kill after some delay.

All of this should be on the docs.rs for the crate, if you find documentation lacking please let me know and I can try and expand on it where necessary.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@phil-skillwon
Comment options

Answer selected by phil-skillwon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants