Created
July 7, 2009 19:30
-
-
Save dbussink/142297 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t1 = Thread.new do | |
sleep 1 | |
100.times do | |
puts "foo" | |
end | |
end | |
t2 = Thread.new do | |
sleep 1 | |
100.times do | |
puts "bar" | |
end | |
end | |
puts "here" | |
[t1, t2].each do |t| | |
t.join | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment