Eric Wong <normalperson / yhbt.net> wrote:
> File thread_2.diff added

I think both thread*.diff are racy since inhibit_thread_creation is
checked outside of GVL and I'm not sure if the idea with these
patches is correct.

Unfortunately I cannot reproduce this issue on Linux, but I would
add debug prints around loops where native_cond_wait() is called
in gvl_yield() and also before sched_yield().

I also remember sched_yield() doesn't work on some OSes, maybe try to
change that to nanosleep()/select()?