I’ve got a quick little issue. I have a system which uses DynamicSupervisors to launch various child processes.
I’d like to end these supervisors after a period of time. There is a convenient pattern for doing this with GenServers: elixir - What is the recomended way to terminate a process if it's unused? - Stack Overflow - but I’d like to be able to do this at the DynamicSupervisor level - invoke the DynamicSupervisor.stop function after a period of time.
Is this ability provided anywhere, or do I need another process to handle DynamicSupervisor termination?