@@ -101,13 +101,10 @@ defmodule Supervisor do
101101
102102 ## Start and shutdown
103103
104- When the supervisor starts, it traverses all children and retrieves
105- each child specification. It is at this moment `{Stack, [:hello]}`
106- becomes a child specification by calling `Stack.child_spec([:hello])`.
107-
108- Then the supervisor starts each child in the order they are defined.
109- This is done by calling the function defined under the `:start` key
110- in the child specification and typically defaults to `start_link/1`.
104+ When the supervisor starts, it traverses all child specifications and
105+ then starts each child in the order they are defined. This is done by
106+ calling the function defined under the `:start` key in the child
107+ specification and typically defaults to `start_link/1`.
111108
112109 The `start_link/1` (or a custom) is then called for each child process.
113110 The `start_link/1` function must return `{:ok, pid}` where `pid` is the
@@ -301,7 +298,9 @@ defmodule Supervisor do
301298 function.
302299
303300 You may also completely override the `child_spec/1` function in the Stack module
304- and return your own child specification.
301+ and return your own child specification. Note there is no guarantee the `child_spec/1`
302+ function will be called by the Supervisor process, as other processes may invoke
303+ it to retrieve the child specification before reaching the supervisor.
305304
306305 ## Exit reasons and restarts
307306
0 commit comments