module Async::Await::Methods

Public Instance Methods

await(&block) click to toggle source
# File lib/async/await/methods.rb, line 34
def await(&block)
        block.call.wait
end
barrier!() click to toggle source
# File lib/async/await/methods.rb, line 38
def barrier!
        task.children.each(&:wait)
end
task() click to toggle source
# File lib/async/await/methods.rb, line 28
def task
        Async::Task.current
end