Skip to content

Instantly share code, notes, and snippets.

@dbussink
Created July 7, 2009 19:30
Show Gist options
  • Save dbussink/142297 to your computer and use it in GitHub Desktop.
Save dbussink/142297 to your computer and use it in GitHub Desktop.
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