diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-26 05:01:33 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-26 05:01:33 +0000 |
commit | 501afa013498079ba8d2bd047e86430fe17d2325 (patch) | |
tree | cdc869da7500c39e1bb7fa9d43533ab0dfde3687 /test/thread/test_sync.rb | |
parent | 00f78058b64bdc8dd4f085bcd37bfb21961faa0e (diff) |
test/thread: fix leaked threads
* test/thread/test_{queue,sync}.rb: join work threads not to leak
threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/thread/test_sync.rb')
-rw-r--r-- | test/thread/test_sync.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/thread/test_sync.rb b/test/thread/test_sync.rb index 870a8e2d39..9509cac6c7 100644 --- a/test/thread/test_sync.rb +++ b/test/thread/test_sync.rb @@ -19,6 +19,9 @@ class SyncTest < Test::Unit::TestCase sleep 0.1 until t.stop? assert_equal(tester.sync_waiting.uniq, tester.sync_waiting) + ensure + t.kill + t.join end def test_sync_upgrade_and_wakeup @@ -39,6 +42,9 @@ class SyncTest < Test::Unit::TestCase } assert_equal(tester.sync_waiting.uniq, tester.sync_waiting) assert_equal(tester.sync_waiting, []) + ensure + t.kill + t.join end def test_sync_lock_and_raise |