From: Eric Wong Date: 2012-07-18T20:42:06+09:00 Subject: [ruby-core:46547] Re: Fwd: [ruby-cvs:43609] ko1:r36433 (trunk): * thread.c (rb_thread_call_without_gvl2): added. SASADA Koichi wrote: > Hi, > > I introduced new API rb_thread_call_without_gvl2() with some documents. > Could you review it? > > # Of course, the name foo2() is not good. > # But I can't make good name for it. > # Good name is welcome. I agree foo2 is not good. Naming things is hard and I don't have a suitable name. > + * read_func(void *data, int *skip_check_flag) { > + * // (a) before read > + * read(buffer); // (b) reading > + * // (c) after read > + * if (read was cpmpleted) { > + * *skip_check_flag = 1; > + * } > + * } 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; } }