diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-28 08:31:03 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-28 08:31:03 +0000 |
commit | 9cbf473287b6e0fca089c30db1cd276b3c2d477c (patch) | |
tree | eb706d3be3d77b7830121a79905588fd091ceadc /vm_backtrace.c | |
parent | b8a1e36201d3965b3f7b87fe1fa1cf55e00ce045 (diff) |
* vm_core.h (enum rb_thread_status): remove THREAD_TO_KILL
* vm_core.h (struct rb_thread_struct): add to_kill field
* thread.c (terminate_i): convert THREAD_TO_KILL to to_kill.
* thread.c (rb_threadptr_to_kill): ditto.
* thread.c (rb_thread_kill): ditto.
* thread.c (rb_thread_wakeup_alive): ditto.
* thread.c (thread_list_i): ditto.
* thread.c (static const char): ditto.
* thread.c (thread_status_name): ditto.
* thread.c (rb_thread_status): ditto.
* thread.c (rb_thread_inspect): ditto.
* vm_backtrace.c (thread_backtrace_to_ary): ditto.
* thread.c (rb_threadptr_execute_interrupts): fix thread status
overwritten issue. [Bug #7450] [ruby-core:50249]
* test/ruby/test_thread.rb (test_hread_status_raise_after_kill):
test for the above.
* test/ruby/test_thread.rb (test_thread_status_in_trap): test for
thread status in trap.
* test/ruby/test_thread.rb (test_status_and_stop_p): remove
Thread.control_interrupt unsafe test. Thread#kill no longer
changes thread status. Instead of, Thread#kill receiver changes
their own status when receiving kill signal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_backtrace.c')
-rw-r--r-- | vm_backtrace.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/vm_backtrace.c b/vm_backtrace.c index 6696391aba..595edc65bf 100644 --- a/vm_backtrace.c +++ b/vm_backtrace.c @@ -738,15 +738,8 @@ thread_backtrace_to_ary(int argc, VALUE *argv, VALUE thval, int to_str) rb_thread_t *th; GetThreadPtr(thval, th); - switch (th->status) { - case THREAD_RUNNABLE: - case THREAD_STOPPED: - case THREAD_STOPPED_FOREVER: - break; - case THREAD_TO_KILL: - case THREAD_KILLED: + if (th->to_kill || th->status == THREAD_KILLED) return Qnil; - } return vm_backtrace_to_ary(th, argc, argv, 0, 0, to_str); } |