Future
Future
Source code in src/officialeye/_api/future.py
cancel()
Attempt to cancel the call. If the call is currently being executed and cannot be canceled, then the method will return False, otherwise the call will be canceled, and the method will return True.
Source code in src/officialeye/_api/future.py
cancelled()
done()
exception(timeout=None)
Return the exception raised by the call. If the call hasn’t yet completed, then this method will wait up to timeout seconds. If the call hasn’t completed in timeout seconds, then a TimeoutError will be raised. Timeout can be an int or float. If timeout is not specified or None, there is no limit to the wait time.
If the future is canceled before completing, then CancelledError will be raised.
If the call completed without raising, None is returned.
Source code in src/officialeye/_api/future.py
result(timeout=None)
Return the value returned by the call. If the call hasn’t yet completed, then this method will wait up to timeout seconds. If the call hasn’t completed in timeout seconds, then a TimeoutError will be raised. Timeout can be an int or float. If timeout is not specified or None, there is no limit to the wait time.
If the future is canceled before completing, then CancelledError will be raised.
If the call raised, this method will raise the same exception.