[erlang-patches] Add supervisor:start_child/3 to limit the number of children
Tue Apr 9 16:10:27 CEST 2013
Is this feature mostly for use with simple_one_for_one supervisors? I
believe (possibly faulty??) that these are the most common supervisor for
which many children are repeatedly restarted as a part of normal execution.
Could you say something more about your use case? Other input on this?
Regarding the implementation, one could say that the behavior differs a
little bit for different types of supervisors and child restart types.
(This is of course due to the nature of the supervisor/child types):
* simple_one_for_one supervisor (all child restart types) -> Limit is
compared to the number of alive children.
* other supervisor type, temporary children -> Limit is compared to the
number of alive children.
* other supervisor type, non-temporary children -> Limit is compared to the
number of child specs.
The very least we need to consider is if this is the correct behavior, and
if so I think it needs to be mentioned in the documentation. Or should the
feature be restricted to simple_one_for_one supervisors (or is it only me?)?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-patches