Class: EventedBluepill::ProcessTimer
- Inherits:
-
Coolio::TimerWatcher
- Object
- Coolio::TimerWatcher
- EventedBluepill::ProcessTimer
- Defined in:
- lib/evented_bluepill/process.rb
Instance Attribute Summary collapse
-
#process ⇒ Object
Returns the value of attribute process.
Instance Method Summary collapse
-
#initialize(process) ⇒ ProcessTimer
constructor
A new instance of ProcessTimer.
- #on_timer ⇒ Object
Constructor Details
#initialize(process) ⇒ ProcessTimer
Returns a new instance of ProcessTimer.
14 15 16 17 |
# File 'lib/evented_bluepill/process.rb', line 14 def initialize(process) self.process = process super(1, true) end |
Instance Attribute Details
#process ⇒ Object
Returns the value of attribute process.
12 13 14 |
# File 'lib/evented_bluepill/process.rb', line 12 def process @process end |
Instance Method Details
#on_timer ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/evented_bluepill/process.rb', line 19 def on_timer return if self.process.skipping_ticks? self.process.skip_ticks_until = nil # clear the memoization per tick self.process.process_running = nil # run state machine transitions self.process.tick self.process.refresh_children! if self.process.up? and self.process.monitor_children? end |