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

Function future_discard_from_awaited_by

Lib/asyncio/futures.py:456–465  ·  view source on GitHub ↗

Record that `fut` is no longer awaited on by `waiter`.

(fut, waiter, /)

Source from the content-addressed store, hash-verified

454
455
456def future_discard_from_awaited_by(fut, waiter, /):
457 """Record that `fut` is no longer awaited on by `waiter`."""
458 # See the comment in "future_add_to_awaited_by()" body for
459 # details on implementation.
460 #
461 # Note that there's an accelerated version of this function
462 # shadowing this implementation later in this file.
463 if isinstance(fut, _PyFuture) and isinstance(waiter, _PyFuture):
464 if fut._Future__asyncio_awaited_by is not None:
465 fut._Future__asyncio_awaited_by.discard(waiter)
466
467
468_py_future_add_to_awaited_by = future_add_to_awaited_by

Callers

nothing calls this directly

Calls 2

isinstanceFunction · 0.85
discardMethod · 0.45

Tested by

no test coverage detected