class Async::Scheduler

def run_once!(timeout = nil)

@returns [Boolean] Whether there is more work to do.
@parameter timeout [Float | Nil] The maximum timeout, or if nil, indefinite.

When terminating the event loop, we already know we are finished. So we don't need to check the task tree. This is a logical requirement because `run_once` ignores transient tasks. For example, a single top level transient task is not enough to keep the reactor running, but during termination we must still process it in order to terminate child tasks.

Run one iteration of the event loop.
def run_once!(timeout = nil)
ime = Async::Clock.now
l = @timers.wait_interval
ere is no interval to wait (thus no timers), and no tasks, we could be done:
rval.nil?
w the user to specify a maximum interval if we would otherwise be sleeping indefinitely:
al = timeout
nterval < 0
ave timers ready to fire, don't sleep in the selctor:
al = 0
imeout and interval > timeout
al = timeout
tor.select(interval)
Errno::EINTR
re.
.fire
te load:
e = Async::Clock.now
uration = end_time - start_time
ration = @selector.idle_duration
ration = total_duration - idle_duration
ime += busy_duration
ime += idle_duration
eactor still has work to do:
true