Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to gracefully stop all children actors in the supervision tree recursively #278

Closed
contrun opened this issue Oct 23, 2024 · 0 comments · Fixed by #277
Closed
Assignees
Labels
enhancement New feature or request

Comments

@contrun
Copy link

contrun commented Oct 23, 2024

Is your feature request related to a problem? Please describe.
Supervision tree can be a particularly useful tool for resource management, as it potentially can reap all the resources of the children actors. But currently, when the parent actor is stopped, all the children are killed without any opportunity to run post_stop. This makes it impossible for them to release all the resources.

Describe the solution you'd like
Add a function to stop all the actors in the tree and run their post_stop functions. This should preferably run in a recursive way (or at least have such function to run it recursively).

Describe alternatives you've considered
Manual management is boring.

Additional context
post_stop of children are being called when supervisor fails. · Issue #226 · slawlor/ractor

@contrun contrun added the enhancement New feature or request label Oct 23, 2024
@slawlor slawlor self-assigned this Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants