Created
July 23, 2010 21:44
-
-
Save chad/488081 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
threads = [] | |
10.times do |n| | |
threads << Thread.new do | |
sleep rand(3) | |
puts "Hell from thread number #{n}" | |
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