Class: Net::SSH::Compat::TimerWatcher
- Inherits:
-
Coolio::TimerWatcher
- Object
- Coolio::TimerWatcher
- Net::SSH::Compat::TimerWatcher
- Defined in:
- lib/pmux/mros.rb
Instance Method Summary collapse
-
#initialize(interval, fiber, watchers) ⇒ TimerWatcher
constructor
A new instance of TimerWatcher.
- #on_timer ⇒ Object
Constructor Details
#initialize(interval, fiber, watchers) ⇒ TimerWatcher
Returns a new instance of TimerWatcher.
38 39 40 41 42 |
# File 'lib/pmux/mros.rb', line 38 def initialize interval, fiber, watchers @fiber = fiber @watchers = watchers super(interval, false) end |
Instance Method Details
#on_timer ⇒ Object
44 45 46 47 |
# File 'lib/pmux/mros.rb', line 44 def on_timer for w in @watchers; w.detach; end @fiber.resume(nil) end |