MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / close

Method close

tools/python-3.11.9-amd64/Lib/asyncio/runners.py:65–79  ·  view source on GitHub ↗

Shutdown and close event loop.

(self)

Source from the content-addressed store, hash-verified

63 self.close()
64
65 def close(self):
66 """Shutdown and close event loop."""
67 if self._state is not _State.INITIALIZED:
68 return
69 try:
70 loop = self._loop
71 _cancel_all_tasks(loop)
72 loop.run_until_complete(loop.shutdown_asyncgens())
73 loop.run_until_complete(loop.shutdown_default_executor())
74 finally:
75 if self._set_event_loop:
76 events.set_event_loop(None)
77 loop.close()
78 self._loop = None
79 self._state = _State.CLOSED
80
81 def get_loop(self):
82 """Return embedded event loop."""

Callers 6

__exit__Method · 0.95
_ensure_futureFunction · 0.45
pipe_connection_lostMethod · 0.45
_feed_stdinMethod · 0.45
_read_streamMethod · 0.45

Calls 5

_cancel_all_tasksFunction · 0.85
run_until_completeMethod · 0.45
shutdown_asyncgensMethod · 0.45
set_event_loopMethod · 0.45

Tested by

no test coverage detected