repo.or.cz
/
rainbows.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Rainbows! 5.2.1
[rainbows.git]
/
lib
/
rainbows
/
coolio_thread_pool
/
watcher.rb
blob
6537ebc46948cc57b4563aba579eb18d4fd434dd
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
8
9
def on_timer
10
@threads.each { |t| t.join(0) and Rainbows.quit! }
11
end
12
end