MCPcopy Index your code
hub / github.com/RustPython/RustPython / __init__

Method __init__

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 6

isinstanceFunction · 0.85
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