Method: Minitest::Parallel::Executor#start

Defined in:
lib/minitest/parallel.rb

#startObject

Start the executor


26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/minitest/parallel.rb', line 26

def start
  @pool  = Array.new(size) {
    Thread.new @queue do |queue|
      Thread.current.abort_on_exception = true
      while job = queue.pop do
        klass, method, reporter = job
        reporter.synchronize { reporter.prerecord klass, method }
        result = Minitest.run_one_method klass, method
        reporter.synchronize { reporter.record result }
      end
    end
  }
end