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

Function Pipe

Lib/multiprocessing/connection.py:563–578  ·  view source on GitHub ↗

Returns pair of connection objects at either end of a pipe

(duplex=True)

Source from the content-addressed store, hash-verified

561if sys.platform != 'win32':
562
563 def Pipe(duplex=True):
564 '''
565 Returns pair of connection objects at either end of a pipe
566 '''
567 if duplex:
568 s1, s2 = socket.socketpair()
569 s1.setblocking(True)
570 s2.setblocking(True)
571 c1 = Connection(s1.detach())
572 c2 = Connection(s2.detach())
573 else:
574 fd1, fd2 = os.pipe()
575 c1 = Connection(fd1, writable=False)
576 c2 = Connection(fd2, readable=False)
577
578 return c1, c2
579
580else:
581

Callers 1

PipeMethod · 0.70

Calls 8

arbitrary_addressFunction · 0.85
PipeConnectionClass · 0.85
ConnectionClass · 0.70
socketpairMethod · 0.45
setblockingMethod · 0.45
detachMethod · 0.45
pipeMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…