class EventCore::FiberTask
Encapsulates state of an async task spun off from a fiber.
Public Class Methods
new(fiber_source)
click to toggle source
# File lib/event_core.rb, line 265 def initialize(fiber_source) @fiber_source = fiber_source end
Public Instance Methods
done(result=nil)
click to toggle source
Mark yielded fiber ready for resumption. If the task has a result supply that as argument to done(), and it will become the result of the yield.
# File lib/event_core.rb, line 271 def done(result=nil) @fiber_source.ready!(result) end