It appears that Timeout.timeout does not work when a Fiber scheduler is set, regardless of the implementation, even when Fibers are not explicitly in use.
Actually, that's not necessarily true, even for the current implementation, see getaddrinfo for example.
You're completely evading my question :p
Could you answer it please?
That's one of the very rare cases, maybe even the only case in core methods that cannot be interrupted by Thread#raise.
Is the idea to simply give up on interrupting anything that's not handled by the scheduler if there is a Fiber.scheduler, or something better?
That seems too incompatible to me.
I think a new API to interrupt only scheduler things might make more sense (related to #17363).
@Eregon (Benoit Daloze) without preemptive scheduling it won't be possible. There are other cases where the GVL is not released, e.g. the sqlite3 gem. In the case of the scheduler, Timeout.timeout is completely broken, so this is an improvement any way you cut it.