       Task.Supervisor.start_link(name: MyApp.DistSupervisor)
 
       # On the client
-      Task.Supervisor.async({MyApp.DistSupervisor, :remote@local},
-                            MyMod, :my_fun, [arg1, arg2, arg3])
+      supervisor = {MyApp.DistSupervisor, :remote@local}
+      Task.Supervisor.async(supervisor, MyMod, :my_fun, [arg1, arg2, arg3])
 
   Note that, when working with distributed tasks, one should use the `Task.Supervisor.async/4` function
   that expects explicit module, function and arguments, instead of `Task.Supervisor.async/2` that


      tasks_with_results = Task.yield_many(tasks, 5000)

      results = Enum.map(tasks_with_results, fn {task, res} ->
        # Shutdown the tasks that did not reply nor exit
        res || Task.shutdown(task, :brutal_kill)
      end)

      # Here we are matching only on {:ok, value} and
      # ignoring {:exit, _} (crashed tasks) and `nil` (no replies)
      for {:ok, value} <- results do
        IO.inspect value
      end

  In the example above, we create tasks that sleep from 1

  A short example is:

      {:ok, pid} = Task.Supervisor.start_link()

      task =
        Task.Supervisor.async(pid, fn ->
          # Do something
        end)

      Task.await(task)

  However, in the majority of cases, you want to add the task supervisor
