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

Function _set_result_unless_cancelled

Lib/asyncio/futures.py:319–323  ·  view source on GitHub ↗

Helper setting the result only if the future was not cancelled.

(fut, result)

Source from the content-addressed store, hash-verified

317
318
319def _set_result_unless_cancelled(fut, result):
320 """Helper setting the result only if the future was not cancelled."""
321 if fut.cancelled():
322 return
323 fut.set_result(result)
324
325
326def _convert_future_exc(exc):

Callers

nothing calls this directly

Calls 2

cancelledMethod · 0.45
set_resultMethod · 0.45

Tested by

no test coverage detected