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

ruby-changes:39920

From: nobu <ko1@a...>
Date: Fri, 2 Oct 2015 09:31:35 +0900 (JST)
Subject: [ruby-changes:39920] nobu:r52001 (trunk): test_thread.rb: thread leak

nobu	2015-10-02 09:31:31 +0900 (Fri, 02 Oct 2015)

  New Revision: 52001

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

  Log:
    test_thread.rb: thread leak
    
    * test/ruby/test_thread.rb (test_handle_interrupt_blocking): fix
      thread leak.

  Modified files:
    trunk/test/ruby/test_thread.rb
Index: test/ruby/test_thread.rb
===================================================================
--- test/ruby/test_thread.rb	(revision 52000)
+++ test/ruby/test_thread.rb	(revision 52001)
@@ -645,11 +645,9 @@ class TestThread < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_thread.rb#L645
           end
         }
       }
-      sleep 1
-      r=:ng
-      th.raise RuntimeError
-      th.join
-    rescue e
+      assert_raise(e) {sleep 1}
+    ensure
+      assert_raise(RuntimeError) {th.join(0)}
     end
     assert_equal(:ok,r)
   end

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

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