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

Method accept_pipe

Lib/asyncio/windows_events.py:620–635  ·  view source on GitHub ↗
(self, pipe)

Source from the content-addressed store, hash-verified

618 return self._register(ov, sock, self.finish_socket_func)
619
620 def accept_pipe(self, pipe):
621 self._register_with_iocp(pipe)
622 ov = _overlapped.Overlapped(NULL)
623 connected = ov.ConnectNamedPipe(pipe.fileno())
624
625 if connected:
626 # ConnectNamePipe() failed with ERROR_PIPE_CONNECTED which means
627 # that the pipe is connected. There is no need to wait for the
628 # completion of the connection.
629 return self._result(pipe)
630
631 def finish_accept_pipe(trans, key, ov):
632 ov.getresult()
633 return pipe
634
635 return self._register(ov, pipe, finish_accept_pipe)
636
637 async def connect_pipe(self, address):
638 delay = CONNECT_PIPE_INIT_DELAY

Callers 1

loop_accept_pipeMethod · 0.80

Calls 4

_register_with_iocpMethod · 0.95
_resultMethod · 0.95
_registerMethod · 0.95
filenoMethod · 0.45

Tested by

no test coverage detected