class Async::Idler
def wait
Wait until the system is idle, according to the maximum load specified.
def wait scheduler = Fiber.scheduler backoff = nil while true load = scheduler.load break if load < @maximum_load if backoff sleep(backoff) backoff *= 2.0 else scheduler.yield backoff = @backoff end end end