From 85784e1b5fca7bbadc7fb5dba1f100785188954f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 28 Feb 2011 03:10:55 +0000 Subject: use IO#wait instead of IO.select for single readers It's a simpler interface and avoids allocating an array which is nice. --- lib/rainbows/client.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/rainbows/client.rb') diff --git a/lib/rainbows/client.rb b/lib/rainbows/client.rb index 3d92da1..9b65cea 100644 --- a/lib/rainbows/client.rb +++ b/lib/rainbows/client.rb @@ -1,5 +1,6 @@ # -*- encoding: binary -*- # :enddoc: +require "io/wait" # this class is used for most synchronous concurrency models class Rainbows::Client < Kgio::Socket @@ -8,7 +9,7 @@ class Rainbows::Client < Kgio::Socket end def kgio_wait_readable - IO.select([self], nil, nil, Rainbows.keepalive_timeout) + wait Rainbows.keepalive_timeout end # used for reading headers (respecting keepalive_timeout) -- cgit v1.2.3-24-ge0c7