class Async::Task

def result

def result
	raise RuntimeError.new("Cannot wait on own fiber") if Fiber.current.equal?(@fiber)
	
	if running?
		@condition ||= Condition.new
		@condition.wait
	else
		Task.yield {@result}
	end
end