1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_thread.rb: handshake

* test/ruby/test_thread.rb (test_handle_interrupt_blocking): add
  handshake.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-10-02 01:23:48 +00:00
parent 337bf75b32
commit b75de9d512

View file

@ -637,15 +637,15 @@ class TestThread < Test::Unit::TestCase
th = Thread.start{
Thread.handle_interrupt(Object => :on_blocking){
begin
sleep 0.0001 until r == :ok
Thread.current.raise RuntimeError
r=:ok
sleep
ensure
th_s.raise e
th_s.raise e, "raise from ensure", $@
end
}
}
assert_raise(e) {sleep 1}
assert_raise(e) {r = :ok; sleep 1}
ensure
assert_raise(RuntimeError) {th.join(0)}
end