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

ruby-changes:37231

From: nobu <ko1@a...>
Date: Sun, 18 Jan 2015 00:58:09 +0900 (JST)
Subject: [ruby-changes:37231] nobu:r49312 (trunk): drb.rb: do not wait handler threads

nobu	2015-01-18 00:57:50 +0900 (Sun, 18 Jan 2015)

  New Revision: 49312

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

  Log:
    drb.rb: do not wait handler threads
    
    * lib/drb/drb.rb (stop_service): just stop but do not wait handler
      threads.

  Modified files:
    trunk/lib/drb/drb.rb
Index: lib/drb/drb.rb
===================================================================
--- lib/drb/drb.rb	(revision 49311)
+++ lib/drb/drb.rb	(revision 49312)
@@ -1467,13 +1467,12 @@ module DRb https://github.com/ruby/ruby/blob/trunk/lib/drb/drb.rb#L1467
       if  Thread.current['DRb'] && Thread.current['DRb']['server'] == self
         Thread.current['DRb']['stop_service'] = true
       else
-        threads = [@thread, *@grp.list]
         if @protocol.respond_to? :shutdown
           @protocol.shutdown
         else
-          threads.each {|thread| thread.kill} # xxx: Thread#kill
+          [@thread, *@grp.list].each {|thread| thread.kill} # xxx: Thread#kill
         end
-        threads.each {|thread| thread.join}
+        @thread.join
       end
     end
 

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

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