Skip to content

Pass IO::WRITABLE, not FMODE_WRITABLE, to the scheduler's io_wait - #9733

Open
sampokuokkanen wants to merge 1 commit into
jruby:masterfrom
sampokuokkanen:scheduler-io-wait-writable
Open

sampokuokkanen wants to merge 1 commit into
jruby:masterfrom
sampokuokkanen:scheduler-io-wait-writable

Conversation

@sampokuokkanen

Copy link
Copy Markdown
Contributor

ioWaitReadable and ioWaitWritable passed OpenFile's mode flags as the event mask. READABLE happens to match IO::READABLE, but WRITABLE is 2, which is IO::PRIORITY, so a write that hit EAGAIN asked the scheduler to wait for priority data. io-event's select backend then never put the IO in the writable set and the writer hung.

Use the IO event values like MRI's rb_fiber_scheduler_io_wait_writable.

ioWaitReadable and ioWaitWritable passed OpenFile's mode flags as the
event mask. READABLE happens to match IO::READABLE, but WRITABLE is 2,
which is IO::PRIORITY, so a write that hit EAGAIN asked the scheduler
to wait for priority data. io-event's select backend then never put the
IO in the writable set and the writer hung.

Use the IO event values like MRI's rb_fiber_scheduler_io_wait_writable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant