Skip to content

Re-starting a panicked Actor from a supervisor? #115

Closed Answered by slawlor
quietlychris asked this question in Q&A
Discussion options

You must be logged in to vote

So actor's can't be restarted, the cleanup routine fully tears down the input and output ports. It need to be re-created, which you will need to manage if you want to do something like state recovery or something. Depending on how the actor died, the state may be unrecoverable or corrupted so it can't be assumed that a restart is safe.

You would simple start a new instance of the actor with spawn_linked against the supervisor. The child that dead will have been automatically removed from the supervision tree during the drop cleanup.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by slawlor
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
Converted from issue

This discussion was converted from issue #114 on May 15, 2023 16:24.