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

Method __init__

Lib/multiprocessing/resource_sharer.py:47–53  ·  view source on GitHub ↗
(self, fd)

Source from the content-addressed store, hash-verified

45 class DupFd(object):
46 '''Wrapper for fd which can be used at any time.'''
47 def __init__(self, fd):
48 new_fd = os.dup(fd)
49 def send(conn, pid):
50 reduction.send_handle(conn, new_fd, pid)
51 def close():
52 os.close(new_fd)
53 self._id = _resource_sharer.register(send, close)
54
55 def detach(self):
56 '''Get the fd. 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