From c19685e208401594c1a21256382eacfadc22d53a Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 14 Oct 2021 22:56:42 +0900 Subject: [PATCH] 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 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