Skip to content

Add support for automatic shutdown to Supervisor #12077

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

Merged
merged 3 commits into from
Aug 16, 2022

Conversation

bbhoss
Copy link
Contributor

@bbhoss bbhoss commented Aug 16, 2022

This adds support for Automatic Shutdown (EEP 56) to Supervisor. This functionality was added in Erlang R24 and leaks processes with older versions so should require 1.15. I believe it should have been listed in #10433 as well.

I tried to summarize the docs in a way that Elixir users wouldn't need to cross reference the OTP ones to use the feature, other than that it's mostly passing through options to :supervisor and spec/doc updates.

@bbhoss bbhoss force-pushed the supervisor-auto-shutdown branch from 796994b to fcb6e45 Compare August 16, 2022 01:31
@josevalim
Copy link
Member

Thank you. We also need to change both DynamicSupervisor and PartitionSupervisor to raise if auto_shutdown is different than :never. And also change DynamicSupervisor to raise if significant is set to true in any child.

@bbhoss
Copy link
Contributor Author

bbhoss commented Aug 16, 2022

Gotcha, I will try to submit those changes this week

@bbhoss
Copy link
Contributor Author

bbhoss commented Aug 16, 2022

Updated. I didn't see any raising going on in the existing DynamicSupervisor code so I just matched the existing validation patterns.

@josevalim josevalim merged commit ca6f5d7 into elixir-lang:main Aug 16, 2022
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

@bbhoss bbhoss deleted the supervisor-auto-shutdown branch December 12, 2022 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants