Class: Actor::Mailbox::Timer
- Inherits:
-
Rev::TimerWatcher
- Object
- Rev::TimerWatcher
- Actor::Mailbox::Timer
- Defined in:
- lib/revactor/mailbox.rb
Overview
Timeout class, used to implement receive timeouts
Instance Method Summary collapse
-
#initialize(seconds, actor) ⇒ Timer
constructor
A new instance of Timer.
- #on_timer ⇒ Object
Constructor Details
#initialize(seconds, actor) ⇒ Timer
Returns a new instance of Timer.
98 99 100 101 |
# File 'lib/revactor/mailbox.rb', line 98 def initialize(seconds, actor) @actor = actor super(seconds) end |
Instance Method Details
#on_timer ⇒ Object
103 104 105 106 107 |
# File 'lib/revactor/mailbox.rb', line 103 def on_timer detach @actor.mailbox.timed_out = true @actor.scheduler << @actor end |