Actions
Feature #11056
closed[PATCH] lib/net/*: use io/wait methods instead of IO.select
[ruby-core:<unknown>]
Description
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
I'll commit in a few days unless there are objections.
Files
Updated by nobu (Nobuyoshi Nakada) about 9 years ago
test-all
failed on OSX.
1) Failure:
HTTPSProxyTest#test_https_proxy_authentication [/Users/nobu/src/ruby/trunk/src/test/net/http/test_https_proxy.rb:42]:
exceptions on 1 threads:
#<Thread:0x00000101990758@/Users/nobu/src/ruby/trunk/src/test/net/http/test_https_proxy.rb:17 dead>:
/Users/nobu/src/ruby/trunk/src/lib/net/protocol.rb:157:in `rbuf_fill': Net::ReadTimeout (Net::ReadTimeout)
from /Users/nobu/src/ruby/trunk/src/lib/net/protocol.rb:135:in `readuntil'
from /Users/nobu/src/ruby/trunk/src/lib/net/protocol.rb:145:in `readline'
from /Users/nobu/src/ruby/trunk/src/lib/net/http/response.rb:39:in `read_status_line'
from /Users/nobu/src/ruby/trunk/src/lib/net/http/response.rb:28:in `read_new'
from /Users/nobu/src/ruby/trunk/src/lib/net/http.rb:920:in `connect'
from /Users/nobu/src/ruby/trunk/src/lib/net/http.rb:863:in `do_start'
from /Users/nobu/src/ruby/trunk/src/lib/net/http.rb:858:in `start'
from /Users/nobu/src/ruby/trunk/src/test/net/http/test_https_proxy.rb:23:in `block (2 levels) in test_https_proxy_authentication'
Updated by normalperson (Eric Wong) about 9 years ago
- File io_wait_readable-no-nread-experimental.patch io_wait_readable-no-nread-experimental.patch added
v2 patch with experimental IO#wait_readable(.., wait_only: bool)
to avoid FIONREAD.
Actions
Like0
Like0Like0Like0