(2012/11/16 19:35), SASADA Koichi wrote: >> May there be other flags that we may need here in the future? >> Perhaps the second argument can be a bitmask to give us more options >> in the future: >> >> read_func(void *data, int *flags) { >> read(buffer); >> if (read was completed) { >> *flags |= RB_NOGVL_SKIP_CHECK; >> } >> } >> > > Sorry for late response. > I agree with that. I commit your suggestion at r37681. > Finally, I decide to change "gvl2" function at r37938. > * include/ruby/thread.h (rb_thread_call_without_gvl2): change > meaning of function. > This function is called with same parameters of > `rb_thread_call_without_gvl()'. > However, if interrupts are detected, when return immediately. The trap handler can be invoked *before* gvl function because of checking interrupt before setting ubf. However, some situation ([Bug #7134]) this behavior is harmful. So I decide to make gvl2 as "CHECK_INTS" free version. -- // SASADA Koichi at atdot dot net