Get the value of the promise, waiting if necessary.

def get(self, timeout=None):
        """Get the value of the promise, waiting if necessary."""
        self.wait(timeout)
        if self._state==self.FULFILLED:
            return self.value
        else:
            raise ValueError("Calculation didn't yield a value")