Skip to content

Managing child actors #279

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

You must be logged in to vote

Yes it looks correct for setting up the link. However you probably will want to customize the supervision flow by customizing the handle_supervisor_evt method on the supervising actor, in this case the MyFirstActor.

That will let your supervisor control what happens when the child starts, stops, or fails. This is how you can have the parent manage the child.

As it stands, the default behavior is to stop the parent when the child exits (graceful stop, or fail)

https://github.com/slawlor/ractor/blob/main/ractor/src/actor/mod.rs#L338C5-L352C6

Replies: 1 comment

Comment options

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