Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/elixir/lib/dynamic_supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,9 @@ defmodule DynamicSupervisor do

`child_spec` should be a valid child specification as detailed in the
"Child specification" section of the documentation for `Supervisor`. The child
process will be started as defined in the child specification.
process will be started as defined in the child specification. Note that while
the `:id` field is still required in the spec, the value is ignored and
therefore does not need to be unique.

If the child process start function returns `{:ok, child}` or `{:ok, child,
info}`, then child specification and PID are added to the supervisor and
Expand Down
9 changes: 5 additions & 4 deletions lib/elixir/lib/supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ defmodule Supervisor do
The child specification is a map containing up to 6 elements. The first two keys
in the following list are required, and the remaining ones are optional:

* `:id` - any term used to identify the child specification
internally by the supervisor; defaults to the given module.
In the case of conflicting `:id` values, the supervisor will refuse
to initialize and require explicit IDs. This key is required.
* `:id` - any term used to identify the child specification internally by
the supervisor; defaults to the given module. This key is required.
For Supervisors, in the case of conflicting `:id` values, the supervisor
will refuse to initialize and require explicit IDs. This is not the case
for DynamicSupervisors though.

* `:start` - a tuple with the module-function-args to be invoked
to start the child process. This key is required.
Expand Down