[前][次][番号順一覧][スレッド一覧]

ruby-changes:38913

From: ngoto <ko1@a...>
Date: Mon, 22 Jun 2015 18:22:07 +0900 (JST)
Subject: [ruby-changes:38913] ngoto:r50994 (trunk): * test/lib/test/unit.rb (Test::Unit::Parallel#start_watchdog): removed

ngoto	2015-06-22 18:21:53 +0900 (Mon, 22 Jun 2015)

  New Revision: 50994

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50994

  Log:
    * test/lib/test/unit.rb (Test::Unit::Parallel#start_watchdog): removed
      because it has been meaningless since r36385. [Bug:11288]
      
    * test/lib/test/unit.rb (Test::Unit::Parallel#_run_parallel): delete
      lines related to the removed start_watchdog method

  Modified files:
    trunk/ChangeLog
    trunk/test/lib/test/unit.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 50993)
+++ ChangeLog	(revision 50994)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Jun 22 18:08:48 2015  Naohisa Goto  <ngotogenome@g...>
+
+	* test/lib/test/unit.rb (Test::Unit::Parallel#start_watchdog): removed
+	  because it has been meaningless since r36385. [Bug:11288]
+
+	* test/lib/test/unit.rb (Test::Unit::Parallel#_run_parallel): delete
+	  lines related to the removed start_watchdog method
+
 Sun Jun 21 23:52:46 2015  Kazuhiro NISHIYAMA  <zn@m...>
 
 	* NEWS: mention Array#bsearch_index and Hash#fetch_values.
Index: test/lib/test/unit.rb
===================================================================
--- test/lib/test/unit.rb	(revision 50993)
+++ test/lib/test/unit.rb	(revision 50994)
@@ -314,22 +314,6 @@ module Test https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit.rb#L314
         end
       end
 
-      def start_watchdog
-        Thread.new do
-          while stat = Process.wait2
-            break if @interrupt # Break when interrupt
-            pid, stat = stat
-            w = (@workers + @dead_workers).find{|x| pid == x.pid }
-            next unless w
-            w = w.dup
-            if w.status != :quit && !w.quit_called?
-              # Worker down
-              w.died(nil, !stat.signaled? && stat.exitstatus)
-            end
-          end
-        end
-      end
-
       def deal(io, type, result, rep, shutting_down = false)
         worker = @workers_hash[io]
         cmd = worker.read
@@ -404,9 +388,6 @@ module Test https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit.rb#L388
         @workers_hash = {} # out-IO => worker
         @ios          = [] # Array of worker IOs
         begin
-          # Thread: watchdog
-          watchdog = start_watchdog
-
           @options[:parallel].times {launch_worker}
 
           while _io = IO.select(@ios)[0]
@@ -420,7 +401,6 @@ module Test https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit.rb#L401
           @interrupt = ex
           return result
         ensure
-          watchdog.kill if watchdog
           if @interrupt
             @ios.select!{|x| @workers_hash[x].status == :running }
             while !@ios.empty? && (__io = IO.select(@ios,[],[],10))

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]