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

Method __init__

Lib/asyncio/base_events.py:210–222  ·  view source on GitHub ↗
(self, transp)

Source from the content-addressed store, hash-verified

208
209class _SendfileFallbackProtocol(protocols.Protocol):
210 def __init__(self, transp):
211 if not isinstance(transp, transports._FlowControlMixin):
212 raise TypeError("transport should be _FlowControlMixin instance")
213 self._transport = transp
214 self._proto = transp.get_protocol()
215 self._should_resume_reading = transp.is_reading()
216 self._should_resume_writing = transp._protocol_paused
217 transp.pause_reading()
218 transp.set_protocol(self)
219 if self._should_resume_writing:
220 self._write_ready_fut = self._transport._loop.create_future()
221 else:
222 self._write_ready_fut = None
223
224 async def drain(self):
225 if self._transport.is_closing():

Callers

nothing calls this directly

Calls 5

get_protocolMethod · 0.45
is_readingMethod · 0.45
pause_readingMethod · 0.45
set_protocolMethod · 0.45
create_futureMethod · 0.45

Tested by

no test coverage detected