SASADA Koichi <ko1 / atdot.net> 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;
        }
      }