Skip to content

Allow interruption of IO waits. #130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Allow interruption of IO waits. #130

wants to merge 1 commit into from

Conversation

ioquatix
Copy link
Member

@ioquatix ioquatix commented Mar 1, 2025

Ruby's IO model allows IO#close to interrupt all pending read/write/wait operations. The Fiber Scheduler did not adopt this model initially, but after some time it's finally caused some compatibility issues for code which expects signalling between IO#close and in-flight operations (to be forcefully interrupted).

This introduces the changes required to support IO interrupting, by passing the IO instance to the rb_io_interruptable_operation, which doesn't exist yet, such that any kind of interruption within Ruby can propagate out.

Types of Changes

  • Bug fix.

Contribution

@ioquatix ioquatix force-pushed the io-interruptable branch 8 times, most recently from 722783e to a887d85 Compare March 2, 2025 20:49
@ioquatix
Copy link
Member Author

No longer required, it's an implicit part of the scheduler hook.

@ioquatix ioquatix closed this May 23, 2025
@ioquatix ioquatix deleted the io-interruptable branch May 23, 2025 06:49
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