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

Method __init__

Lib/multiprocessing/resource_sharer.py:29–34  ·  view source on GitHub ↗
(self, sock)

Source from the content-addressed store, hash-verified

27 class DupSocket(object):
28 '''Picklable wrapper for a socket.'''
29 def __init__(self, sock):
30 new_sock = sock.dup()
31 def send(conn, pid):
32 share = new_sock.share(pid)
33 conn.send_bytes(share)
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.'''

Callers

nothing calls this directly

Calls 2

dupMethod · 0.45
registerMethod · 0.45

Tested by

no test coverage detected