From 514ef756fc6566970dc4cf520aa2583aa633e8a6 Mon Sep 17 00:00:00 2001 From: Andrea Leopardi Date: Thu, 27 Mar 2025 19:20:13 +0100 Subject: [PATCH] Mention child order in docs for Supervisor.child_spec/2 --- lib/elixir/lib/supervisor.ex | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/elixir/lib/supervisor.ex b/lib/elixir/lib/supervisor.ex index 76e8b83f069..6829ee90c21 100644 --- a/lib/elixir/lib/supervisor.ex +++ b/lib/elixir/lib/supervisor.ex @@ -990,6 +990,12 @@ defmodule Supervisor do value, or if it fails, the child specification is discarded and this function returns `{:error, error}` where `error` is a term containing information about the error and child specification. + + > #### Order Among Children {: .tip} + > + > The child specification is **appended** to the children of `supervisor`. + > This guarantees that semantics of things such as the `:rest_for_one` strategy + > are preserved correctly. """ @spec start_child( supervisor,