Object
This file is imported from the minitest project. DO NOT make modifications in this repo. They will be reverted! File a patch instead and assign it to Ryan Davis.
# File minitest/parallel_each.rb, line 13 def initialize list @queue = Queue.new # *sigh*... the Queue api sucks sooo much... list.each { |i| @queue << i } N.times { @queue << nil } end
# File minitest/parallel_each.rb, line 24 def each threads = N.times.map { Thread.new do Thread.current.abort_on_exception = true while job = @queue.pop yield job end end } threads.map(&:join) end
# File minitest/parallel_each.rb, line 20 def grep pattern self.class.new super end
This page was generated for Ruby 2.0.0
Ruby-doc.org is provided by James Britt and Neurogami. Maximum R+D.
Generated with Ruby-doc Rdoc Generator 0.26.0.