class Async::WorkerPool::Promise

def wait

@returns [Object] The result of the work.

Wait for the work to be done.
def wait
	@guard.synchronize do
		while @state == :pending
			@condition.wait(@guard)
		end
		
		if @state == :failed
			raise @value
		else
			return @value
		end
	end
end