Skip to content

Commit f6f7d30

Browse files
authored
Mention child order in docs for Supervisor.child_spec/2 (#14373)
1 parent ad1a6b1 commit f6f7d30

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/elixir/lib/supervisor.ex

+6
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,12 @@ defmodule Supervisor do
990990
value, or if it fails, the child specification is discarded and this function
991991
returns `{:error, error}` where `error` is a term containing information about
992992
the error and child specification.
993+
994+
> #### Order Among Children {: .tip}
995+
>
996+
> The child specification is **appended** to the children of `supervisor`.
997+
> This guarantees that semantics of things such as the `:rest_for_one` strategy
998+
> are preserved correctly.
993999
"""
9941000
@spec start_child(
9951001
supervisor,

0 commit comments

Comments
 (0)