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/coolio/heartbeat.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/rainbows/fiber/coolio/heartbeat.rb') diff --git a/lib/rainbows/fiber/coolio/heartbeat.rb b/lib/rainbows/fiber/coolio/heartbeat.rb index f48f7ef..6b1e4f9 100644 --- a/lib/rainbows/fiber/coolio/heartbeat.rb +++ b/lib/rainbows/fiber/coolio/heartbeat.rb @@ -1,12 +1,10 @@ # -*- encoding: binary -*- # :enddoc: class Rainbows::Fiber::Coolio::Heartbeat < Coolio::TimerWatcher - G = Rainbows::G - # ZZ gets populated by read_expire in rainbows/fiber/io/methods ZZ = Rainbows::Fiber::ZZ def on_timer - exit if (! G.tick && G.cur <= 0) + exit if (! Rainbows.tick && Rainbows.cur <= 0) now = Time.now fibs = [] ZZ.delete_if { |fib, time| now >= time ? fibs << fib : ! fib.alive? } -- cgit v1.2.3-24-ge0c7