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

Method _force_close

Lib/asyncio/proactor_events.py:134–152  ·  view source on GitHub ↗
(self, exc)

Source from the content-addressed store, hash-verified

132 self._force_close(exc)
133
134 def _force_close(self, exc):
135 if self._empty_waiter is not None and not self._empty_waiter.done():
136 if exc is None:
137 self._empty_waiter.set_result(None)
138 else:
139 self._empty_waiter.set_exception(exc)
140 if self._closing and self._called_connection_lost:
141 return
142 self._closing = True
143 self._conn_lost += 1
144 if self._write_fut:
145 self._write_fut.cancel()
146 self._write_fut = None
147 if self._read_fut:
148 self._read_fut.cancel()
149 self._read_fut = None
150 self._pending_write = 0
151 self._buffer = None
152 self._loop.call_soon(self._call_connection_lost, exc)
153
154 def _call_connection_lost(self, exc):
155 if self._called_connection_lost:

Callers 6

_fatal_errorMethod · 0.95
_loop_readingMethod · 0.45
_loop_writingMethod · 0.45
abortMethod · 0.45
_pipe_closedMethod · 0.45
abortMethod · 0.45

Calls 5

doneMethod · 0.45
set_resultMethod · 0.45
set_exceptionMethod · 0.45
cancelMethod · 0.45
call_soonMethod · 0.45

Tested by

no test coverage detected