Skip to content

Conversation

@headius
Copy link
Member

@headius headius commented Feb 26, 2025

This only implements it for a couple forms of read and for Socket#connect. Other places still need to be wired up.

@headius headius added this to the JRuby 10.0.0.0 milestone Feb 26, 2025
@headius
Copy link
Member Author

headius commented Feb 27, 2025

This may not be the right approach. The select methods called are frequently called in a loop until they produce an error or return a true result. In the cast of Socket#connect, if a timeout is exceeded, it will always return false without raising an error.

We probably need to enhance the RubyThread.select logic to optionally raise a timeout error rather than just return false, since there's no way outside of these methods to determine that the select timed out versus simply selecting nothing.

This only implements it for a couple forms of read and for
Socket#connect. Other places still need to be wired up.
@headius headius changed the base branch from 10-dev to master March 10, 2025 22:05
@headius headius mentioned this pull request Mar 28, 2025
headius added a commit to headius/jruby that referenced this pull request Apr 2, 2025
IO#timeout is a work in progress.

See jruby#8662
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