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

ruby-changes:56719

From: Kazuhiro <ko1@a...>
Date: Wed, 31 Jul 2019 17:48:24 +0900 (JST)
Subject: [ruby-changes:56719] Kazuhiro NISHIYAMA: 14eede6e53 (master): Fix `Leaked thread`

https://git.ruby-lang.org/ruby.git/commit/?id=14eede6e53

From 14eede6e530f58bc22fb6d89ecf910eb1cfcf240 Mon Sep 17 00:00:00 2001
From: Kazuhiro NISHIYAMA <zn@m...>
Date: Wed, 31 Jul 2019 17:45:43 +0900
Subject: Fix `Leaked thread`

Sometimes `Leaked thread: Rinda::TestRingServer#test_ring_server_ipv6_multicast` happens
because `Rinda::TupleSpace#start_keeper` runs after stopping `@keeper`.

diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb
index 2c2c099..0b870a6 100644
--- a/test/rinda/test_rinda.rb
+++ b/test/rinda/test_rinda.rb
@@ -623,6 +623,7 @@ class TestRingServer < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/rinda/test_rinda.rb#L623
     @server = DRb.start_service("druby://localhost:0")
   end
   def teardown
+    @rs.shutdown
     # implementation-dependent
     @ts.instance_eval{
       if th = @keeper
@@ -630,7 +631,6 @@ class TestRingServer < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/rinda/test_rinda.rb#L631
         th.join
       end
     }
-    @rs.shutdown
     @server.stop_service
   end
 
-- 
cgit v0.10.2


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

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