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

Method _maybe_pause_protocol

Lib/asyncio/transports.py:279–295  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

277 self._set_write_buffer_limits()
278
279 def _maybe_pause_protocol(self):
280 size = self.get_write_buffer_size()
281 if size <= self._high_water:
282 return
283 if not self._protocol_paused:
284 self._protocol_paused = True
285 try:
286 self._protocol.pause_writing()
287 except (SystemExit, KeyboardInterrupt):
288 raise
289 except BaseException as exc:
290 self._loop.call_exception_handler({
291 'message': 'protocol.pause_writing() failed',
292 'exception': exc,
293 'transport': self,
294 'protocol': self._protocol,
295 })
296
297 def _maybe_resume_protocol(self):
298 if (self._protocol_paused and

Callers 8

writeMethod · 0.80
writelinesMethod · 0.80
sendtoMethod · 0.80
writeMethod · 0.80
writeMethod · 0.80
_loop_writingMethod · 0.80
sendtoMethod · 0.80

Calls 3

get_write_buffer_sizeMethod · 0.95
pause_writingMethod · 0.45

Tested by

no test coverage detected