1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test/unit.rb: minimum workers

* test/lib/test/unit.rb (_run_parallel): launch only necessary
  workers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-01-28 11:27:32 +00:00
parent b2c9c82cb7
commit 1127a366fd

View file

@ -422,7 +422,7 @@ module Test
@workers_hash = {} # out-IO => worker
@ios = [] # Array of worker IOs
begin
@options[:parallel].times {launch_worker}
[@tasks.size, @options[:parallel]].min.times {launch_worker}
while _io = IO.select(@ios)[0]
break if _io.any? do |io|