class Async::Scheduler
def run(...)
@yields {|task| ...} The top level task, if a block is given.
@public Since *Async v1*.
Forwards all parameters to {#async} if a block is given.
Run the reactor until all tasks are finished. Proxies arguments to {#async} immediately before entering the loop, if a block is provided.
def run(...) Kernel.raise ClosedError if @selector.nil? begin @profiler&.start initial_task = self.async(...) if block_given? self.run_loop do run_once end return initial_task ensure @profiler&.stop end end