Skip to content

Commit 6863a51

Browse files
authored
Improve task remote vs. local documentation (#13502)
1 parent 388b69e commit 6863a51

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/elixir/lib/task.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,14 @@ defmodule Task do
135135
136136
With `Task.Supervisor`, it is easy to dynamically start tasks across nodes:
137137
138-
# On the remote node named :remote@local
138+
# First on the remote node named :remote@local
139139
Task.Supervisor.start_link(name: MyApp.DistSupervisor)
140140
141-
# On the client
141+
# Then on the local client node
142142
supervisor = {MyApp.DistSupervisor, :remote@local}
143143
Task.Supervisor.async(supervisor, MyMod, :my_fun, [arg1, arg2, arg3])
144144
145-
Note that, when working with distributed tasks, one should use the
145+
Note that, as above, when working with distributed tasks, one should use the
146146
`Task.Supervisor.async/5` function that expects explicit module, function,
147147
and arguments, instead of `Task.Supervisor.async/3` that works with anonymous
148148
functions. That's because anonymous functions expect the same module version

0 commit comments

Comments
 (0)