Skip to content

Instantly share code, notes, and snippets.

@ascruggs
Created December 3, 2009 20:28
Show Gist options
  • Save ascruggs/248485 to your computer and use it in GitHub Desktop.
Save ascruggs/248485 to your computer and use it in GitHub Desktop.
threads = []
threads << Thread.new do
begin
raise "boom"
rescue
puts $!
sleep(1)
puts $!
end
end
threads << Thread.new do
begin
raise "pow"
rescue
puts $!
end
end
threads.each { |t| t.join }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment