Supervisor child pid

Roger Lipscombe roger@REDACTED
Wed Mar 4 10:22:25 CET 2020


On Wed, 4 Mar 2020 at 08:33, zxq9 <zxq9@REDACTED> wrote:
> I now regard the feeling that "I need to look up the list of a
> supervisor's children" as a code smell in just about every case other
> than writing system tools.

fwiw, our current system has a custom supervisor implementation in one
(and only one) place which deals specifically with "start a child with
this ID; if it already exists, give me back the current pid"; it's a
simplification/enhancement of a simple_one_for_one supervisor (which
doesn't otherwise track IDs).

But, we *also* have a process registry tracking the same processes,
but for different purposes. Whether I'd do that again in hindsight,
I'm not sure; at the time we identified the need for a custom
supervisor, and I *think* some of those constraints are still valid.
Our process registry is also custom, because we had slightly different
needs than most of the extant process registry implementations
offered.

-- 
Roger.


More information about the erlang-questions mailing list