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

ruby-changes:68470

From: Nobuyoshi <ko1@a...>
Date: Thu, 14 Oct 2021 22:58:21 +0900 (JST)
Subject: [ruby-changes:68470] c19685e208 (master): Reap rarely leaked threads

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

From c19685e208401594c1a21256382eacfadc22d53a Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 14 Oct 2021 22:56:42 +0900
Subject: Reap rarely leaked threads

---
 test/ruby/test_thread_cv.rb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/test/ruby/test_thread_cv.rb b/test/ruby/test_thread_cv.rb
index 812c4221bc..88733419da 100644
--- a/test/ruby/test_thread_cv.rb
+++ b/test/ruby/test_thread_cv.rb
@@ -89,6 +89,9 @@ class TestThreadConditionVariable < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_thread_cv.rb#L89
     end
 
     assert_equal ["C1", "C1", "C1", "P1", "P2", "C2", "C2", "C2"], result
+  ensure
+    threads.each(&:kill)
+    threads.each(&:join)
   end
 
   def test_condvar_wait_deadlock
-- 
cgit v1.2.1


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

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