-
Notifications
You must be signed in to change notification settings - Fork 202
Open
Description
In Chapter 09, section 9.1, the following code on iex
Todo.System.start_link
Process.exit(Process.whereis(Todo.ProcessRegistry),:kill)
causes the Supervisor to crash(after trying to restart the children). Trying to inspect the result of Registry.start_link
, it shows
{:error,
{:shutdown,
{:failed_to_start_child, Todo.ProcessRegistry.PIDPartition0,
{:already_started, #PID<0.183.0>}}}}
Am guessing that this happens because the supervisor is starting ProcessRegistry
in succession before the actual Registry
is shutdown and keeps erroring 3 times, ending up in shutdown.
Is that correct?
How to handle this scenario gracefully?
Metadata
Metadata
Assignees
Labels
No labels