aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-10-14 22:56:42 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-10-14 22:57:45 +0900
commitc19685e208401594c1a21256382eacfadc22d53a (patch)
tree4f398d57cfae8b090e08bd1f892680069f0821ed
parent2fa0d51ac9b505a836369a5613e2d0359ee918cf (diff)
downloadruby-c19685e208401594c1a21256382eacfadc22d53a.tar.gz
Reap rarely leaked threads
-rw-r--r--test/ruby/test_thread_cv.rb3
1 files changed, 3 insertions, 0 deletions
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