What's the difference between Actor.stop, Actor.exit_after, and Actor.kill? #161
-
What's the difference between Actor.stop, Actor.exit_after, and Actor.kill? |
Beta Was this translation helpful? Give feedback.
Answered by
slawlor
Sep 12, 2023
Replies: 1 comment 1 reply
-
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. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
phil-skillwon
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
stop
stops the actor from processing future messages, but will finish the current message. This is a "graceful" stopkill
will stop the actor at the next async await point, which can interrupt current message processing. This is a "forceful" stopexit_after
will simply send thestop
message after some delay, and can be used to schedule a stop operation. There's a similarkill_after
which sendskill
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.