Skip to content

Conversation

@casperisfine
Copy link
Collaborator

Ruby IOs have an internal buffer already, the only reason we have to buffer again ourselves is to be able to timeout on IO#gets.

With IO#timeout being introduced in Ruby 3.2, we can get rid of the second buffer.

This is just a PoC, there is a handful of test failures, I just wanted to explore.

FYI: @ioquatix

One discovered issue is that we can't do that with SSLSocket: ruby/openssl#693, to be explored further.

Ruby IOs have an internal buffer already, the only reason we have
to buffer again ourselves is to be able to timeout on `IO#gets`.

With `IO#timeout` being introduced in Ruby 3.2, we can get rid
of the second buffer.

This is just a PoC, there is a handful of test failures, I just
wanted to explore.
@casperisfine
Copy link
Collaborator Author

This OpenSSL limitation was fixed: ruby/openssl#714

Not sure when I'll get back to this, but we should have a path forward now.

@ioquatix
Copy link

It’s awesome to see this is useful.

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.

4 participants