diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-12-13 13:39:57 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-12-13 13:39:57 +0900 |
commit | c7530f0d568e9772bef22a93907f92d8cd872995 (patch) | |
tree | f0998eba2626af383c1e3b6bcfdd76de5cb200fa /test/ruby/test_thread.rb | |
parent | 416e402cf3d756dcf9c5b10dc7042adf686efacf (diff) |
Wait testing/helper threads to terminate
Diffstat (limited to 'test/ruby/test_thread.rb')
-rw-r--r-- | test/ruby/test_thread.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index 0eb5d74a7f..3852cb7020 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -230,9 +230,9 @@ class TestThread < Test::Unit::TestCase assert_equal(t1, t3.value) ensure - t1&.kill - t2&.kill - t3&.kill + t1&.kill&.join + t2&.kill&.join + t3&.kill&.join end { 'FIXNUM_MAX' => RbConfig::LIMITS['FIXNUM_MAX'], @@ -630,7 +630,7 @@ class TestThread < Test::Unit::TestCase Thread.pass until t.stop? assert_predicate(t, :alive?) ensure - t&.kill + t&.kill&.join end def test_mutex_deadlock @@ -1119,7 +1119,7 @@ q.pop Thread.pass until mutex.locked? assert_equal(mutex.owned?, false) ensure - th&.kill + th&.kill&.join end end |