docs: def x(self):
          """Block the main thead until future finish, return the future.result()."""
          with self._condition:
              result = None
              if not self.done():
                  self._condition.wait(self._timeout)
              if not self.done():
                  # timeout
                  self.set_exception(TimeoutError())
              if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:
                  # cancelled
                  result = CancelledError()
              elif self._state == FINISHED:
                  # finished
                  if self._exception:
                      result = self._exception
                  else:
                      result = self._result
              if isinstance(result, Exception):
                  if self.catch_exception:
                      result = FailureException(result)
                      return result
                  else:
                      raise result
              return result