MCPcopy Index your code
hub / github.com/RustPython/RustPython / _set_concurrent_future_state

Function _set_concurrent_future_state

Lib/asyncio/futures.py:336–348  ·  view source on GitHub ↗

Copy state from a future to a concurrent.futures.Future.

(concurrent, source)

Source from the content-addressed store, hash-verified

334
335
336def _set_concurrent_future_state(concurrent, source):
337 """Copy state from a future to a concurrent.futures.Future."""
338 assert source.done()
339 if source.cancelled():
340 concurrent.cancel()
341 if not concurrent.set_running_or_notify_cancel():
342 return
343 exception = source.exception()
344 if exception is not None:
345 concurrent.set_exception(_convert_future_exc(exception))
346 else:
347 result = source.result()
348 concurrent.set_result(result)
349
350
351def _copy_future_state(source, dest):

Callers 1

_set_stateFunction · 0.85

Calls 9

_convert_future_excFunction · 0.85
doneMethod · 0.45
cancelledMethod · 0.45
cancelMethod · 0.45
exceptionMethod · 0.45
set_exceptionMethod · 0.45
resultMethod · 0.45
set_resultMethod · 0.45

Tested by

no test coverage detected