ruby-changes:45377
From: nobu <ko1@a...>
Date: Sat, 28 Jan 2017 20:27:47 +0900 (JST)
Subject: [ruby-changes:45377] nobu:r57450 (trunk): test/unit.rb: minimum workers
nobu 2017-01-28 20:27:32 +0900 (Sat, 28 Jan 2017) New Revision: 57450 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57450 Log: test/unit.rb: minimum workers * test/lib/test/unit.rb (_run_parallel): launch only necessary workers. Modified files: trunk/test/lib/test/unit.rb Index: test/lib/test/unit.rb =================================================================== --- test/lib/test/unit.rb (revision 57449) +++ test/lib/test/unit.rb (revision 57450) @@ -422,7 +422,7 @@ module Test https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit.rb#L422 @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| -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/