class Async::Scheduler
def run_once(timeout = nil)
@parameter timeout [Float | Nil] The maximum timeout, or if nil, indefinite.
@asynchronous Must be invoked from blocking (root) fiber.
@public Since *Async v1*.
Run one iteration of the event loop.
def run_once(timeout = nil) Kernel.raise "Running scheduler on non-blocking fiber!" unless Fiber.blocking? if self.finished? self.stop end # If we are finished, we stop the task tree and exit: if @children.nil? return false end return run_once!(timeout) end