class Phlex::SGML

def await(task)

Other tags:
    Api: - private
def await(task)
	if task.is_a?(Concurrent::IVar)
		flush if task.pending?
		task.wait.value
	elsif defined?(Async::Task) && task.is_a?(Async::Task)
		flush if task.running?
		task.wait
	else
		raise ArgumentError, "Expected an asynchronous task / promise."
	end
end