-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Evaluate cases where resolver is likely to cause blocking behaviour #6
Comments
The two that immediately come to mind are:
|
What we should probably do is provide explicit guarantees about blocking and non-blocking behaviour, and document it. Additionally, I've filed some bugs with Ruby, which affect this: https://bugs.ruby-lang.org/issues/13407 |
I've thought about this more. I've implemented a generic API on top of Socket, which uses |
I can't remember exactly why, but I used https://github.com/socketry/socketry/blob/master/lib/socketry/resolver/system.rb#L26 |
The core |
Under the hood, ruby often calls
getaddrinfo
to turn things likelocalhost
into astruct sockaddr
. This is often going to be a blocking operation, which will block the entire reactor.I'd like to enumerate cases where blocking behaviour might be experienced (e.g.
Async::TCPSocket.connect
with a hostname), and figure out a solution.The text was updated successfully, but these errors were encountered: