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

Method connect_read_pipe

Lib/asyncio/events.py:539–550  ·  view source on GitHub ↗

Register read pipe in event loop. Set the pipe to non-blocking mode. protocol_factory should instantiate object with Protocol interface. pipe is a file-like object. Return pair (transport, protocol), where transport supports the ReadTransport interface.

(self, protocol_factory, pipe)

Source from the content-addressed store, hash-verified

537 # Pipes and subprocesses.
538
539 async def connect_read_pipe(self, protocol_factory, pipe):
540 """Register read pipe in event loop. Set the pipe to non-blocking mode.
541
542 protocol_factory should instantiate object with Protocol interface.
543 pipe is a file-like object.
544 Return pair (transport, protocol), where transport supports the
545 ReadTransport interface."""
546 # The reason to accept file-like object instead of just file descriptor
547 # is: we need to own pipe and close it at transport finishing
548 # Can got complicated errors if pass f.fileno(),
549 # close fd in pipe transport then close f and vice versa.
550 raise NotImplementedError
551
552 async def connect_write_pipe(self, protocol_factory, pipe):
553 """Register write pipe in event loop.

Callers 4

innerMethod · 0.95
_connect_pipesMethod · 0.45
connectMethod · 0.45

Calls

no outgoing calls

Tested by 3

innerMethod · 0.76
connectMethod · 0.36