Created
August 17, 2011 02:44
-
-
Save MarkMenard/1150702 to your computer and use it in GitHub Desktop.
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
# gem install work_queue | |
require 'rubygems' | |
require 'work_queue' | |
100.times do |j| | |
wq = WorkQueue.new(100, nil, 0.01) | |
1000.times do |i| | |
wq.enqueue_b do | |
puts "!!!!!!!!!!!!!!!!!!!! DONE - Finished run #{j} !!!!!!!!!!!!!!!!!!!!" if i == 999 | |
end | |
end | |
wq.join | |
end | |
# Under JRuby 1.6.3 we never get here. | |
puts "*********************** DONE *********************" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment