Class: Integer
- Inherits:
-
Object
- Object
- Integer
- Defined in:
- lib/minitest/test_task.rb
Instance Method Summary collapse
-
#threads_do(jobs) ⇒ Object
:nodoc:.
Instance Method Details
#threads_do(jobs) ⇒ Object
:nodoc:
293 294 295 296 297 298 299 300 301 302 303 304 |
# 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 |