* thread. (rb_thread_terminate_all): revert r24591 which caused SEGV
sometimes. [ruby-dev:40936] [ruby-core:27245] [ruby-core:27416] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e76a19ece3
commit
97cfd1869c
@ -1,3 +1,8 @@
|
|||||||
|
Wed Apr 28 22:53:57 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
|
* thread. (rb_thread_terminate_all): revert r24591 which caused SEGV
|
||||||
|
sometimes. [ruby-dev:40936] [ruby-core:27245] [ruby-core:27416]
|
||||||
|
|
||||||
Wed Apr 28 22:26:55 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
Wed Apr 28 22:26:55 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
* test/psych/visitors/test_yaml_tree.rb (test_struct_const): remove
|
* test/psych/visitors/test_yaml_tree.rb (test_struct_const): remove
|
||||||
|
11
thread.c
11
thread.c
@ -341,8 +341,6 @@ rb_thread_terminate_all(void)
|
|||||||
{
|
{
|
||||||
rb_thread_t *th = GET_THREAD(); /* main thread */
|
rb_thread_t *th = GET_THREAD(); /* main thread */
|
||||||
rb_vm_t *vm = th->vm;
|
rb_vm_t *vm = th->vm;
|
||||||
VALUE einfo = vm->main_thread->errinfo;
|
|
||||||
int state;
|
|
||||||
|
|
||||||
if (vm->main_thread != th) {
|
if (vm->main_thread != th) {
|
||||||
rb_bug("rb_thread_terminate_all: called by child thread (%p, %p)",
|
rb_bug("rb_thread_terminate_all: called by child thread (%p, %p)",
|
||||||
@ -359,14 +357,13 @@ rb_thread_terminate_all(void)
|
|||||||
|
|
||||||
while (!rb_thread_alone()) {
|
while (!rb_thread_alone()) {
|
||||||
PUSH_TAG();
|
PUSH_TAG();
|
||||||
if ((state = EXEC_TAG()) == 0) {
|
if (EXEC_TAG() == 0) {
|
||||||
rb_thread_schedule();
|
rb_thread_schedule();
|
||||||
}
|
}
|
||||||
POP_TAG();
|
else {
|
||||||
if (state && einfo != vm->main_thread->errinfo &&
|
/* ignore exception */
|
||||||
RUBY_VM_SET_INTERRUPT(vm->main_thread)) {
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
POP_TAG();
|
||||||
}
|
}
|
||||||
rb_thread_stop_timer_thread();
|
rb_thread_stop_timer_thread();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user