Skip to content

Instantly share code, notes, and snippets.

@jeregrine
Created May 15, 2015 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeregrine/4aa9a3f1f60d90fcbf35 to your computer and use it in GitHub Desktop.
Save jeregrine/4aa9a3f1f60d90fcbf35 to your computer and use it in GitHub Desktop.
task timeout catch
results = try do
Task.await(search_task, @timeout)
catch
:exit, {:timeout, {Task, :await, [_, @timeout]}} -> []
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment