'Gets the value of this Future. This call will block until
the result is available, or until an optional timeout expires.
When this Future is cancelled with an error,
Arguments:
timeout -- The maximum waiting time to obtain the value.'

def get_value(self, timeout=None):

    self._event.wait(timeout)
    if self._exception:
        raise self._exception
    if (not self._event.is_set()):
        raise TimeoutException
    return self._value
