class Async::Variable

def initialize(condition = Condition.new)

def initialize(condition = Condition.new)
	@condition = condition
	@value = nil
end

def resolve(value = true)

def resolve(value = true)
	@value = value
	condition = @condition
	@condition = nil
	
	self.freeze
	
	condition.signal(value)
end

def resolved?

def resolved?
	@condition.nil?
end

def value

def value
	@condition&.wait
	return @value
end

def wait

def wait
	self.value
end