From 15631717fce044fbad2f386a7b1c7daf4bdd83d2 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 21 Oct 2010 16:25:39 -0700 Subject: code shuffling for kgio Despite the large number of changes, most of it is code movement here. --- lib/rainbows/fiber_spawn.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/rainbows/fiber_spawn.rb') diff --git a/lib/rainbows/fiber_spawn.rb b/lib/rainbows/fiber_spawn.rb index ec259ad..1a0da04 100644 --- a/lib/rainbows/fiber_spawn.rb +++ b/lib/rainbows/fiber_spawn.rb @@ -17,13 +17,12 @@ module Rainbows init_worker_process(worker) Fiber::Base.setup(self.class, app) limit = worker_connections - fio = Rainbows::Fiber::IO begin schedule do |l| break if G.cur >= limit io = l.kgio_tryaccept or next - ::Fiber.new { process_client(fio.new(io, ::Fiber.current)) }.resume + ::Fiber.new { process(io) }.resume end rescue => e Error.listen_loop(e) -- cgit v1.2.3-24-ge0c7