MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / result

Method result

tools/python-3.11.9-amd64/Lib/asyncio/futures.py:189–204  ·  view source on GitHub ↗

Return the result this future represents. If the future has been cancelled, raises CancelledError. If the future's result isn't yet available, raises InvalidStateError. If the future is done and has an exception set, this exception is raised.

(self)

Source from the content-addressed store, hash-verified

187 return self._state != _PENDING
188
189 def result(self):
190 """Return the result this future represents.
191
192 If the future has been cancelled, raises CancelledError. If the
193 future's result isn't yet available, raises InvalidStateError. If
194 the future is done and has an exception set, this exception is raised.
195 """
196 if self._state == _CANCELLED:
197 exc = self._make_cancelled_error()
198 raise exc
199 if self._state != _FINISHED:
200 raise exceptions.InvalidStateError('Result is not ready.')
201 self.__log_traceback = False
202 if self._exception is not None:
203 raise self._exception.with_traceback(self._exception_tb)
204 return self._result
205
206 def exception(self):
207 """Return the exception that was set on this future.

Callers 15

runcodeMethod · 0.95
__await__Method · 0.95
loop_accept_pipeMethod · 0.45
_copy_future_stateFunction · 0.45
__wakeupMethod · 0.45
wait_forFunction · 0.45
_wait_for_oneFunction · 0.45
_done_callbackFunction · 0.45
_inner_done_callbackFunction · 0.45
_loop_readingMethod · 0.45
_loop_writingMethod · 0.45

Calls 1

_make_cancelled_errorMethod · 0.95

Tested by

no test coverage detected