class_docstr: Represents the result of an asynchronous computation.
class_docstr_tok: ["Represents","the","result","of","an","asynchronous","computation","."]
docstr: Return the result of the call that the future represents.
  
  Args:
      timeout: The number of seconds to wait for the result if the future
          isn't done. If None, then there is no limit on the wait time.
  
  Returns:
      The result of the call that the future represents.
  
  Raises:
      CancelledError: If the future was cancelled.
      TimeoutError: If the future didn't finish executing before the given
          timeout.
      Exception: If the call raised then that exception will be raised.
docstr_tok: ["Return","the","result","of","the","call","that","the","future","represents",".","Args",":","timeout",":","The","number","of","seconds","to","wait","for","the","result","if","the","future","is","n't","done",".","If","None",",","then","there","is","no","limit","on","the","wait","time",".","Returns",":","The","result","of","the","call","that","the","future","represents",".","Raises",":","CancelledError",":","If","the","future","was","cancelled",".","TimeoutError",":","If","the","future","did","n't","finish","executing","before","the","given","timeout",".","Exception",":","If","the","call","raised","then","that","exception","will","be","raised","."]
code: def result(self, timeout=None):
      """Return the result of the call that the future represents.
  
      Args:
          timeout: The number of seconds to wait for the result if the future
              isn't done. If None, then there is no limit on the wait time.
  
      Returns:
          The result of the call that the future represents.
  
      Raises:
          CancelledError: If the future was cancelled.
          TimeoutError: If the future didn't finish executing before the given
              timeout.
          Exception: If the call raised then that exception will be raised.
      """
      try:
          with self._condition:
              if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:
                  raise CancelledError()
              elif self._state == FINISHED:
                  return self.__get_result()
  
              self._condition.wait(timeout)
  
              if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:
                  raise CancelledError()
              elif self._state == FINISHED:
                  return self.__get_result()
              else:
                  raise TimeoutError()
      finally:
          # Break a reference cycle with the exception in self._exception
          self = None
  
imports: import collections
  import logging
  import threading
  import time
  import types
label_desc: Use image node_id 10 for calling the Future obj's underlying member method code with example usage: obj.result(timeout) and returns: self, self