summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorKJ Tsanaktsidis <ktsanaktsidis@zendesk.com>2024-09-13 17:40:30 +1000
committerKJ Tsanaktsidis <kj@kjtsanaktsidis.id.au>2024-09-17 10:11:44 +1000
commite08d5239b68ad61a731f4938cf963e37a5e88c25 (patch)
tree85960f18ac3f470a73cd2641ef1636ef00f7eda7 /test/ruby
parent50d4840bd975a5e187c56dc4a56795cb6d02d658 (diff)
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]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11614
Diffstat (limited to 'test/ruby')
0 files changed, 0 insertions, 0 deletions