From 6bde32081338ce8075854f4c47ce8ca5347df919 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 5 Jan 2011 17:06:20 -0800 Subject: eliminate G constant and just use the Rainbows! module Code organization is hard :< --- lib/rainbows/fiber_spawn.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rainbows/fiber_spawn.rb') diff --git a/lib/rainbows/fiber_spawn.rb b/lib/rainbows/fiber_spawn.rb index 17bd884..84df30d 100644 --- a/lib/rainbows/fiber_spawn.rb +++ b/lib/rainbows/fiber_spawn.rb @@ -17,12 +17,12 @@ module Rainbows::FiberSpawn begin schedule do |l| - break if G.cur >= limit + break if Rainbows.cur >= limit io = l.kgio_tryaccept or next Fiber.new { process(io) }.resume end rescue => e Rainbows::Error.listen_loop(e) - end while G.alive || G.cur > 0 + end while Rainbows.alive || Rainbows.cur > 0 end end -- cgit v1.2.3-24-ge0c7