MCPcopy Index your code
hub / github.com/RustPython/RustPython / reduce_connection

Function reduce_connection

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

Source from the content-addressed store, hash-verified

1160
1161if sys.platform == 'win32':
1162 def reduce_connection(conn):
1163 handle = conn.fileno()
1164 with socket.fromfd(handle, socket.AF_INET, socket.SOCK_STREAM) as s:
1165 from . import resource_sharer
1166 ds = resource_sharer.DupSocket(s)
1167 return rebuild_connection, (ds, conn.readable, conn.writable)
1168 def rebuild_connection(ds, readable, writable):
1169 sock = ds.detach()
1170 return Connection(sock.detach(), readable, writable)

Callers

nothing calls this directly

Calls 2

fromfdMethod · 0.80
filenoMethod · 0.45

Tested by

no test coverage detected