Skip to content

Commit 588a99a

Browse files
committed
Tiny improvements to Task docs
1 parent 5a71ce0 commit 588a99a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/elixir/lib/task.ex

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -987,10 +987,11 @@ defmodule Task do
987987
no reply has arrived, or `{:exit, reason}` if the task has already
988988
exited. Keep in mind that normally a task failure also causes
989989
the process owning the task to exit. Therefore this function can
990-
return `{:exit, reason}` only if
990+
return `{:exit, reason}` if at least one of the conditions below apply:
991991
992992
* the task process exited with the reason `:normal`
993-
* it isn't linked to the caller
993+
* the task isn't linked to the caller (the task was started
994+
with `Task.async_nolink/2` or `Task.Supervisor.async_nolink/3`)
994995
* the caller is trapping exits
995996
996997
A timeout, in milliseconds or `:infinity`, can be given with a default value
@@ -1079,8 +1080,9 @@ defmodule Task do
10791080
10801081
`Task.yield_many/2` allows developers to spawn multiple tasks
10811082
and retrieve the results received in a given timeframe.
1082-
If we combine it with `Task.shutdown/2`, it allows us to gather
1083-
those results and cancel the tasks that have not replied in time.
1083+
If we combine it with `Task.shutdown/2` (or `Task.ignore/2`),
1084+
it allows us to gather those results and cancel (or ignore)
1085+
the tasks that have not replied in time.
10841086
10851087
Let's see an example.
10861088

0 commit comments

Comments
 (0)