class RSwim::Agent::FiberBased
Public Instance Methods
resume()
click to toggle source
# File lib/rswim/agent.rb, line 55 def resume @f.resume end
run()
click to toggle source
Calls superclass method
RSwim::Agent::Base#run
# File lib/rswim/agent.rb, line 51 def run @f = Fiber.new { super } end
Protected Instance Methods
pause()
click to toggle source
# File lib/rswim/agent.rb, line 61 def pause t = monotonic_seconds Fiber.yield t′ = monotonic_seconds t′ - t end