summary refs log tree commit homepage
path: root/lib/rainbows/queue_pool.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-01-05 17:06:20 -0800
committerEric Wong <normalperson@yhbt.net>2011-01-06 07:17:19 +0000
commit6bde32081338ce8075854f4c47ce8ca5347df919 (patch)
tree71759032be458838eb33f7951172e8572aec4b6d /lib/rainbows/queue_pool.rb
parentd6e4975937a9590f48dc39b1a4aefa9d62f34616 (diff)
Code organization is hard :<
Diffstat (limited to 'lib/rainbows/queue_pool.rb')
-rw-r--r--lib/rainbows/queue_pool.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/rainbows/queue_pool.rb b/lib/rainbows/queue_pool.rb
index 4a2ab8c..99cb9db 100644
--- a/lib/rainbows/queue_pool.rb
+++ b/lib/rainbows/queue_pool.rb
@@ -6,8 +6,6 @@ require 'thread'
 # This is NOT used for the ThreadPool class, since that class does not
 # need a userspace Queue.
 class Rainbows::QueuePool < Struct.new(:queue, :threads)
-  G = Rainbows::G
-
   def initialize(size = 20, &block)
     q = Queue.new
     self.threads = (1..size).map do
@@ -23,7 +21,7 @@ class Rainbows::QueuePool < Struct.new(:queue, :threads)
   def quit!
     threads.each { |_| queue << nil }
     threads.delete_if do |t|
-      G.tick
+      Rainbows.tick
       t.alive? ? t.join(0.01) : true
     end until threads.empty?
   end