eliminate G constant and just use the Rainbows! module
[rainbows.git] / lib / rainbows / coolio_thread_pool / watcher.rb
blob6537ebc46948cc57b4563aba579eb18d4fd434dd
1 # -*- encoding: binary -*-
2 # :enddoc:
3 class Rainbows::CoolioThreadPool::Watcher < Coolio::TimerWatcher
4   def initialize(threads)
5     @threads = threads
6     super(Rainbows.server.timeout, true)
7   end
9   def on_timer
10     @threads.each { |t| t.join(0) and Rainbows.quit! }
11   end
12 end