From 497ce74310baaa7ac4835b8d6aa76acb40d44b7c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 8 May 2011 01:28:43 +0000 Subject: xepoll_thread_spawn: inline needless method shorter line and 3 lines of code killed! --- lib/rainbows/xepoll_thread_spawn/client.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/rainbows/xepoll_thread_spawn/client.rb b/lib/rainbows/xepoll_thread_spawn/client.rb index 8cb3d27..76b4ca2 100644 --- a/lib/rainbows/xepoll_thread_spawn/client.rb +++ b/lib/rainbows/xepoll_thread_spawn/client.rb @@ -56,7 +56,7 @@ module Rainbows::XEpollThreadSpawn::Client ot = now - ot defer = [] LOCK.synchronize do - KATO.delete_if { |client, time| time < ot and client.timeout!(defer) } + KATO.delete_if { |client, time| time < ot and defer << client } end defer.each { |io| io.closed? or io.close } end @@ -68,10 +68,6 @@ module Rainbows::XEpollThreadSpawn::Client epoll_run(buf) end - def timeout!(defer) - defer << self - end - def close super kato_delete -- cgit v1.2.3-24-ge0c7