class Async::Condition
def wait
-
(Object)
-
def wait fiber = Fiber.current @waiting << fiber Task.yield # It would be nice if there was a better construct for this. We only need to invoke #delete if the task was not resumed normally. This can only occur with `raise` and `throw`. But there is no easy way to detect this. # ensure when not return or ensure when raise, throw rescue Exception @waiting.delete(fiber) raise end