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

ruby-changes:34161

From: nobu <ko1@a...>
Date: Fri, 30 May 2014 11:32:42 +0900 (JST)
Subject: [ruby-changes:34161] nobu:r46242 (trunk): test_beginendblock.rb: avoid leaking threads

nobu	2014-05-30 11:32:37 +0900 (Fri, 30 May 2014)

  New Revision: 46242

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

  Log:
    test_beginendblock.rb: avoid leaking threads
    
    * test/ruby/test_beginendblock.rb (test_endblock_raise): not only
      kill, but also wait the end.

  Modified files:
    trunk/test/ruby/test_beginendblock.rb
Index: test/ruby/test_beginendblock.rb
===================================================================
--- test/ruby/test_beginendblock.rb	(revision 46241)
+++ test/ruby/test_beginendblock.rb	(revision 46242)
@@ -141,7 +141,7 @@ EOW https://github.com/ruby/ruby/blob/trunk/test/ruby/test_beginendblock.rb#L141
     assert_match(/e1/, out)
     assert_match(/e6/, out)
   ensure
-    th.kill if th.alive?
+    th.kill.join if th.alive?
   end
 
   def test_nested_at_exit

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

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