>>>>> "n" == nobu nokada <nobu.nokada / softhome.net> writes:

n> Refined patch.

 This is better for me, perhaps add 

   errno = EINTR;

 before rb_thread_schedule();

n> +    if (state) {
n> +	rb_trap_immediate = 0;
n> +	JUMP_TAG(state);
n> +    }
n> +

        errno = EINTR;


n> +    if (curr_thread->status == THREAD_STOPPED) {
n> +	rb_thread_schedule();
n> +    }
n> +
n> +    return val;
n> +}
n> +


 and remove it in thread_switch() ?


Guy Decoux