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

Method pause_reading

Lib/asyncio/proactor_events.py:198–215  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

196 return not self._paused and not self._closing
197
198 def pause_reading(self):
199 if self._closing or self._paused:
200 return
201 self._paused = True
202
203 # bpo-33694: Don't cancel self._read_fut because cancelling an
204 # overlapped WSASend() loss silently data with the current proactor
205 # implementation.
206 #
207 # If CancelIoEx() fails with ERROR_NOT_FOUND, it means that WSASend()
208 # completed (even if HasOverlappedIoCompleted() returns 0), but
209 # Overlapped.cancel() currently silently ignores the ERROR_NOT_FOUND
210 # error. Once the overlapped is ignored, the IOCP loop will ignores the
211 # completion I/O event and so not read the result of the overlapped
212 # WSARecv().
213
214 if self._loop.get_debug():
215 logger.debug("%r pauses reading", self)
216
217 def resume_reading(self):
218 if self._closing or not self._paused:

Callers 1

_sendfile_nativeMethod · 0.45

Calls 2

get_debugMethod · 0.45
debugMethod · 0.45

Tested by

no test coverage detected