mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_thread.rb: thread leak
* test/ruby/test_thread.rb (test_handle_interrupt_blocking): fix thread leak. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ae8c13f517
commit
337bf75b32
1 changed files with 3 additions and 5 deletions
|
@ -645,11 +645,9 @@ class TestThread < Test::Unit::TestCase
|
|||
end
|
||||
}
|
||||
}
|
||||
sleep 1
|
||||
r=:ng
|
||||
th.raise RuntimeError
|
||||
th.join
|
||||
rescue e
|
||||
assert_raise(e) {sleep 1}
|
||||
ensure
|
||||
assert_raise(RuntimeError) {th.join(0)}
|
||||
end
|
||||
assert_equal(:ok,r)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue