Concurrent Data Processing in Elixir: JobSupervisor does not go down (page 54)

First of all, thank you for answering my question and updating the book. after thinking about your solution I now have a couple of questions.

  1. what if “Jobber.JobSupervisor” was restarting its children? Isn’t there a possibility “Supervisor.count_children(pid).active == 0” will return true for a while?
  2. who should be responsible to run this code? I cannot think of a good place to add this code, should we add a new GenServer for this code?