class Async::Semaphore
def release
def release @count -= 1 while (@limit - @count) > 0 and fiber = @waiting.shift if fiber.alive? Fiber.scheduler.resume(fiber) end end end
def release @count -= 1 while (@limit - @count) > 0 and fiber = @waiting.shift if fiber.alive? Fiber.scheduler.resume(fiber) end end end