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

Method _asyncgen_finalizer_hook

Lib/asyncio/base_events.py:561–564  ·  view source on GitHub ↗
(self, agen)

Source from the content-addressed store, hash-verified

559 raise RuntimeError('Executor shutdown has been called')
560
561 def _asyncgen_finalizer_hook(self, agen):
562 self._asyncgens.discard(agen)
563 if not self.is_closed():
564 self.call_soon_threadsafe(self.create_task, agen.aclose())
565
566 def _asyncgen_firstiter_hook(self, agen):
567 if self._asyncgens_shutdown_called:

Callers

nothing calls this directly

Calls 4

is_closedMethod · 0.95
call_soon_threadsafeMethod · 0.95
discardMethod · 0.45
acloseMethod · 0.45

Tested by

no test coverage detected