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

Method detach

Lib/multiprocessing/resource_sharer.py:36–40  ·  view source on GitHub ↗

Get the socket. This should only be called once.

(self)

Source from the content-addressed store, hash-verified

34 self._id = _resource_sharer.register(send, new_sock.close)
35
36 def detach(self):
37 '''Get the socket. This should only be called once.'''
38 with _resource_sharer.get_connection(self._id) as conn:
39 share = conn.recv_bytes()
40 return socket.fromshare(share)
41
42else:
43 __all__ += ['DupFd']

Callers

nothing calls this directly

Calls 2

get_connectionMethod · 0.80
recv_bytesMethod · 0.45

Tested by

no test coverage detected