diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-06 20:30:43 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-06 20:30:43 +0000 |
commit | 84b012e02a567f79dc3061cd860be982f95be048 (patch) | |
tree | 78dc35d87193481c49ff2c0ec1c2dd30639867be /lib/drb | |
parent | 8e08552ed01e827b4e3ca3e0d57695a8737cb394 (diff) | |
download | ruby-84b012e02a567f79dc3061cd860be982f95be048.tar.gz |
stdlib: use IO#wait_*able instead of IO.select when possible
In case a process encounters high-numbered FDs, this allows
consistent performance on systems with ppoll support.
[ruby-core:35572]
* ext/socket/lib/socket.rb (connect_nonblock): use IO#wait_writable
* lib/drb/drb.rb (DRB::DRbTCPSocket#alive?): use IO#wait_readable
* lib/webrick/httpserver.rb (run): ditto
* lib/resolv.rb (request): ditto for single socket case
[ruby-core:68943] [Feature #11081]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/drb')
-rw-r--r-- | lib/drb/drb.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/drb/drb.rb b/lib/drb/drb.rb index e7a8d20211..32e5bfb9e7 100644 --- a/lib/drb/drb.rb +++ b/lib/drb/drb.rb @@ -48,6 +48,7 @@ require 'socket' require 'thread' require 'fcntl' +require 'io/wait' require 'drb/eq' # @@ -1003,7 +1004,7 @@ module DRb # Check to see if this connection is alive. def alive? return false unless @socket - if IO.select([@socket], nil, nil, 0) + if @socket.to_io.wait_readable(0) close return false end |