Currently I have a use case where a Live View process can created a number of child processes that the user will interact with. These child processes are created using a DynamicSupervisor because I want them to restart if they ever encounter an error.
What I want is that when the Live View process terminates, All the children are removed from the dynamic supervisor. I figure you could do this my having a single GenServer that monitors the live view process and terminates the child processes when the live view dies. Is there a library out there that already does this? Registry gets most of the way there, but i haven't found a way to get the Registry to listen to DOWN events. I don't think this would be hard to write, I'd just like to avoid it if something mature already exists. Thanks!