Parent

Methods

Minitest::Parallel::Executor

Attributes

size[R]

Public Class Methods

new(size) click to toggle source
# File lib/minitest/parallel.rb, line 6
def initialize size
  @size  = size
  @queue = Queue.new
  @pool  = size.times.map {
    Thread.new(@queue) do |queue|
    Thread.current.abort_on_exception = true
      while job = queue.pop
        klass, method, reporter = job
        result = Minitest.run_one_method klass, method
        reporter.synchronize { reporter.record result }
      end
    end
  }
end

Public Instance Methods

<<(work;) click to toggle source
# File lib/minitest/parallel.rb, line 21
def << work; @queue << work; end
shutdown() click to toggle source
# File lib/minitest/parallel.rb, line 23
def shutdown
  size.times { @queue << nil }
  @pool.each(&:join)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.