Project

General

Profile

« Previous | Next » 

Revision e08d5239

Added by kjtsanaktsidis (KJ Tsanaktsidis) 8 months ago

Ensure fiber scheduler is woken up when close interrupts read

If one thread is reading and another closes that socket, the close
blocks waiting for the read to abort cleanly. This ensures that Ruby is
totally done with the file descriptor BEFORE we tell the OS to close
and potentially re-use it.

When the read is correctly terminated, the close should be unblocked.
That currently works if closing is happening on a thread, but if it's
happening on a fiber with a fiber scheduler, it does NOT work.

This patch ensures that if the close happened in a fiber scheduled
thread, that the scheduler is notified that the fiber is unblocked.

[Bug #20723]