#786: MacRuby does not finish when more exceptions is generated on same Thread almost at the same time. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@…): When MacRuby threw an exception for MainThread, it does not work when execute pthread_cancel(MainThread).[[BR]] So, In substitution for pthread_cancel(), I guess it to be fixed when execute `__vm_raise()`. {{{ #!diff diff --git a/vm.cpp b/vm.cpp index 5b71769..cfd00e0 100644 --- a/vm.cpp +++ b/vm.cpp @@ -4610,7 +4610,12 @@ rb_vm_thread_raise(rb_vm_thread_t *t, VALUE exc) RoxorVM *vm = (RoxorVM *)t->vm; vm->push_current_exception(exc); - rb_vm_thread_cancel(t); + if(t->vm == RoxorVM::main) { + __vm_raise(); + } + else { + rb_vm_thread_cancel(t); + } } extern "C" }}} Unfortunately, I did not understand how to stop when I do an infinite loop in MainThread's block. So, #176 does not fix. X( -- Ticket URL: <http://www.macruby.org/trac/ticket/786#comment:1> MacRuby <http://macruby.org/>