class Async::Task
def result
-
(Object)
-
Raises:
-
(RuntimeError)
- if the task's fiber is the current fiber.
def result raise RuntimeError.new("Cannot wait on own fiber") if Fiber.current.equal?(@fiber) if running? @finished ||= Condition.new @finished.wait else Task.yield {@result} end end