Bug #5368 » patch.diff
thread.c | ||
---|---|---|
rb_threadptr_unlock_all_locking_mutexes(th);
|
||
thread_debug("rb_thread_terminate_all (main thread: %p)\n", (void *)th);
|
||
st_foreach(vm->living_threads, terminate_i, (st_data_t)th);
|
||
vm->inhibit_thread_creation = 1;
|
||
while (!rb_thread_alone()) {
|
||
PUSH_TAG();
|
||
if (EXEC_TAG() == 0) {
|
||
rb_thread_schedule();
|
||
if(GET_THREAD() == th) {
|
||
st_foreach(vm->living_threads, terminate_i, (st_data_t)th);
|
||
rb_thread_schedule();
|
||
}
|
||
else {
|
||
/* ignore exception */
|
||
PUSH_TAG();
|
||
if (EXEC_TAG() == 0) {
|
||
rb_thread_schedule();
|
||
}
|
||
else {
|
||
/* ignore exception */
|
||
}
|
||
POP_TAG();
|
||
}
|
||
POP_TAG();
|
||
}
|
||
}
|
||