diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-15 20:11:23 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-15 20:11:23 +0000 |
commit | b90ad8a2f68251343569fd8824c4bcfeb25188a7 (patch) | |
tree | 08d0637c25ff6c0582e2bc6e44945cacc4f085d6 /lib/net/http/generic_request.rb | |
parent | dc3c2496bb9b86b8837b23e83a83d896236c2eca (diff) | |
download | ruby-b90ad8a2f68251343569fd8824c4bcfeb25188a7.tar.gz |
lib/net/*: use io/wait methods instead of IO.select
io/wait is expected to work on any platform where sockets are
supported. io/wait methods uses fewer allocations and uses
ppoll internally under Linux for better performance on
high-numbered FDs.
[ruby-core:35572] describes the performance advantage of ppoll
on high-numbered FDs.
* lib/net/protocol.rb (rbuf_fill): use IO#wait_*able
* lib/net/http/generic_request.rb (wait_for_continue): ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/http/generic_request.rb')
-rw-r--r-- | lib/net/http/generic_request.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/http/generic_request.rb b/lib/net/http/generic_request.rb index 00ff434ccf..9b7d28757d 100644 --- a/lib/net/http/generic_request.rb +++ b/lib/net/http/generic_request.rb @@ -309,7 +309,7 @@ class Net::HTTPGenericRequest def wait_for_continue(sock, ver) if ver >= '1.1' and @header['expect'] and @header['expect'].include?('100-continue') - if IO.select([sock.io], nil, nil, sock.continue_timeout) + if sock.io.to_io.wait_readable(sock.continue_timeout) res = Net::HTTPResponse.read_new(sock) unless res.kind_of?(Net::HTTPContinue) res.decode_content = @decode_content |