Skip to content

Commit

Permalink
Correct Task.yield/2 usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
lexmag committed Oct 9, 2016
1 parent 59b19bb commit b846204
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/elixir/lib/task.ex
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,10 @@ defmodule Task do
milliseconds, you should chain this together with `shutdown/1`, like so:
case Task.yield(task, timeout) || Task.shutdown(task) do
{:ok, result} -> result
{:ok, result} ->
result
nil ->
Logger.warn "Failed to get a result in #{timeout} ms
Logger.warn "Failed to get a result in #{timeout}ms"
nil
end
Expand Down

0 comments on commit b846204

Please sign in to comment.