4 ms·
> - a lot of knowledge is implicit (try checking if you can dynamically add children to a Supervisor) https://hexdocs.pm/elixir/DynamicSupervisor.html https://
by antfarm 2y ago
> - a lot of knowledge is implicit (try checking if you can dynamically add children to a Supervisor)
https://hexdocs.pm/elixir/DynamicSupervisor.html https://hexdocs.pm/elixir/DynamicSupervisor.html
- xlii 2y agoI know about Dynamic one, but since I clicked and read (expecting some change) and noticed intro paragraph: > The Supervisor module was designed to handle >>mostly<< static children that are started in the given order when the supervisor starts. Emphasis mine. But I will spread knowledge that: yes, one can add child to a running Supervisor in runtime and Supervisor will try to use supervision strategy on it (as opposed to DynamicSupervisor that immediately forgets about its child). Replacing a child requires stop-remove in loop (see sibling comment response for exact case).