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

Method _server_pipe_handle

Lib/asyncio/windows_events.py:270–286  ·  view source on GitHub ↗
(self, first)

Source from the content-addressed store, hash-verified

268 return tmp
269
270 def _server_pipe_handle(self, first):
271 # Return a wrapper for a new pipe handle.
272 if self.closed():
273 return None
274 flags = _winapi.PIPE_ACCESS_DUPLEX | _winapi.FILE_FLAG_OVERLAPPED
275 if first:
276 flags |= _winapi.FILE_FLAG_FIRST_PIPE_INSTANCE
277 h = _winapi.CreateNamedPipe(
278 self._address, flags,
279 _winapi.PIPE_TYPE_MESSAGE | _winapi.PIPE_READMODE_MESSAGE |
280 _winapi.PIPE_WAIT,
281 _winapi.PIPE_UNLIMITED_INSTANCES,
282 windows_utils.BUFSIZE, windows_utils.BUFSIZE,
283 _winapi.NMPWAIT_WAIT_FOREVER, _winapi.NULL)
284 pipe = windows_utils.PipeHandle(h)
285 self._free_instances.add(pipe)
286 return pipe
287
288 def closed(self):
289 return (self._address is None)

Callers 2

__init__Method · 0.95
_get_unconnected_pipeMethod · 0.95

Calls 2

closedMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected