Skip to content

Instantly share code, notes, and snippets.

@ceshine
Created May 24, 2020 12:11
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 ceshine/68bb19921492543d3fca23b70d080e9b to your computer and use it in GitHub Desktop.
Save ceshine/68bb19921492543d3fca23b70d080e9b to your computer and use it in GitHub Desktop.
A simple script to demonstrate the @async macro in Julia
begin
tmp1 = @async sleep(20)
tmp2 = @async sleep(30)
@time fetch(tmp1)
@time fetch(tmp2)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment