MCPcopy Index your code
hub / github.com/python/cpython / future_discard_from_awaited_by

Function future_discard_from_awaited_by

Lib/asyncio/futures.py:457–466  ·  view source on GitHub ↗

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

(fut, waiter, /)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

discardMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…