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

Function reduce_connection

Lib/multiprocessing/connection.py:1208–1213  ·  view source on GitHub ↗
(conn)

Source from the content-addressed store, hash-verified

1206
1207if sys.platform == 'win32':
1208 def reduce_connection(conn):
1209 handle = conn.fileno()
1210 with socket.fromfd(handle, socket.AF_INET, socket.SOCK_STREAM) as s:
1211 from . import resource_sharer
1212 ds = resource_sharer.DupSocket(s)
1213 return rebuild_connection, (ds, conn.readable, conn.writable)
1214 def rebuild_connection(ds, readable, writable):
1215 sock = ds.detach()
1216 return Connection(sock.detach(), readable, writable)

Callers

nothing calls this directly

Calls 1

filenoMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…