Class: Integer

Inherits:
Object show all
Defined in:
lib/minitest/test_task.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#threads_do(jobs) ⇒ Object

:nodoc:



318
319
320
321
322
323
324
325
326
327
328
# File 'lib/minitest/test_task.rb', line 318

def threads_do jobs # :nodoc:
  q = Work.new jobs

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