Skip to content

Instantly share code, notes, and snippets.

@gmilby
Created December 13, 2013 03:21
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 gmilby/7939369 to your computer and use it in GitHub Desktop.
Save gmilby/7939369 to your computer and use it in GitHub Desktop.
t1 = Thread.new do
i = 0
1_000_000.times do
i += 1
end
end
t2 = Thread.new do
j = 0
1_000_000.times do
j += 1
end
end
t1.join
t2.join
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment