Created
February 11, 2016 18:26
-
-
Save jeremywrnr/ff351bd03cdad0106135 to your computer and use it in GitHub Desktop.
basic parallelism in ruby
This file contains 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
group = 0..8 | |
threads = [] | |
group.each do |member| | |
threads << Thread.new do | |
# DO MULTITHREADING HERE | |
# puts member | |
end | |
threads.each{ |t| t.join } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment