MN: skip waiting on fiber schedulers

If the Fiber is nonblocking mode, fiber scheduler needs to handle
IO events.
This commit is contained in:
Koichi Sasada 2023-12-23 07:46:56 +09:00
parent beec3d07c9
commit fa5de8f68d

View File

@ -1691,7 +1691,10 @@ static int
thread_io_wait_events(rb_thread_t *th, rb_execution_context_t *ec, int fd, int events, struct timeval *timeout, struct waiting_fd *wfd)
{
#if defined(USE_MN_THREADS) && USE_MN_THREADS
if (!th_has_dedicated_nt(th) && (events || timeout)) {
if (!th_has_dedicated_nt(th) &&
(events || timeout) &&
th->blocking // no fiber scheduler
) {
int r;
rb_hrtime_t rel, *prel;