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

Function _call_set_state

Lib/asyncio/futures.py:401–410  ·  view source on GitHub ↗
(source)

Source from the content-addressed store, hash-verified

399 source_loop.call_soon_threadsafe(source.cancel)
400
401 def _call_set_state(source):
402 if (destination.cancelled() and
403 dest_loop is not None and dest_loop.is_closed()):
404 return
405 if dest_loop is None or dest_loop is events._get_running_loop():
406 _set_state(destination, source)
407 else:
408 if dest_loop.is_closed():
409 return
410 dest_loop.call_soon_threadsafe(_set_state, destination, source)
411
412 destination.add_done_callback(_call_check_cancel)
413 source.add_done_callback(_call_set_state)

Callers

nothing calls this directly

Calls 4

_set_stateFunction · 0.85
cancelledMethod · 0.45
is_closedMethod · 0.45
call_soon_threadsafeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…