Skip to content

Start implementing IO#timeout #8662

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy