class Celluloid::Actor::Sleeper
Public Class Methods
new(timers, interval)
click to toggle source
# File lib/celluloid/actor.rb, line 261 def initialize(timers, interval) @timers = timers @interval = interval end
Public Instance Methods
before_suspend(task)
click to toggle source
# File lib/celluloid/actor.rb, line 266 def before_suspend(task) @timers.after(@interval) { task.resume } end
wait()
click to toggle source
# File lib/celluloid/actor.rb, line 270 def wait Kernel.sleep(@interval) end