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

* test/ruby/test_thread.rb (test_thread_status_in_trap): change test for

thread status in trap. now can accept Thread#join and Thread#value in trap.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tarui 2012-11-28 13:24:36 +00:00
parent 9d0de48e66
commit c6557c6fab
2 changed files with 16 additions and 11 deletions

View file

@ -1,3 +1,8 @@
Wed Nov 28 22:20:55 2012 Masaya Tarui <tarui@ruby-lang.org>
* test/ruby/test_thread.rb (test_thread_status_in_trap): change test for
thread status in trap. now can accept Thread#join and Thread#value in trap.
Wed Nov 28 21:58:47 2012 Koichi Sasada <ko1@atdot.net>
* include/ruby/thread.h (rb_thread_call_without_gvl2): change

View file

@ -857,7 +857,7 @@ class TestThreadGroup < Test::Unit::TestCase
end
def test_thread_join_in_trap
assert_raise(ThreadError) {
assert_nothing_raised{
t = Thread.new{ sleep 0.2; Process.kill(:INT, $$) }
Signal.trap :INT do
@ -867,16 +867,16 @@ class TestThreadGroup < Test::Unit::TestCase
t.join
}
assert_raise(ThreadError) {
t = Thread.new{ sleep 0.2; Process.kill(:INT, $$) }
Signal.trap :INT do
t.value
end
t.value
}
assert_equal(:normal_end,
begin
t = Thread.new{ sleep 0.2; Process.kill(:INT, $$); :normal_end }
Signal.trap :INT do
t.value
end
t.value
end
)
end
def test_thread_join_current