Skip to content

Instantly share code, notes, and snippets.

@MarkMenard
Created August 17, 2011 02:44
Show Gist options
  • Save MarkMenard/1150702 to your computer and use it in GitHub Desktop.
Save MarkMenard/1150702 to your computer and use it in GitHub Desktop.
# 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