123456789_123456789_123456789_123456789_123456789_

Class: Integer

Relationships & Source Files
Inherits: Object
Defined in: lib/minitest/test_task.rb

Instance Method Summary

Instance Method Details

#threads_do(jobs)

This method is for internal use only.
[ GitHub ]

  
# File 'lib/minitest/test_task.rb', line 293

def threads_do(jobs) # :nodoc:
  require "thread"
  q = Work.new jobs

  self.times.map {
    Thread.new do
      while job = q.pop # go until quit value
        yield job
      end
    end
  }.each(&:join)
end