Skip to content

Commit 47f4721

Browse files
rosstaJosé Valim
authored andcommitted
Update doc for DynamicSupervisor.start_child (#7299)
The previous example made it seem like the arguments to `def start_child` where being dropped by `spec = MyWorker`.
1 parent beb6923 commit 47f4721

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/elixir/lib/dynamic_supervisor.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ defmodule DynamicSupervisor do
106106
def start_child(foo, bar, baz) do
107107
# If MyWorker is not using the new child specs, we need to pass a map:
108108
# spec = %{id: MyWorker, start: {MyWorker, :start_link, [foo, bar, baz]}}
109-
spec = MyWorker
109+
spec = {MyWorker, foo: foo, bar: bar, baz: baz}
110110
DynamicSupervisor.start_child(__MODULE__, spec)
111111
end
112112

0 commit comments

Comments
 (0)