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

Method __init__

Lib/multiprocessing/reduction.py:106–119  ·  view source on GitHub ↗
(self, handle, access, pid=None)

Source from the content-addressed store, hash-verified

104 class DupHandle(object):
105 '''Picklable wrapper for a handle.'''
106 def __init__(self, handle, access, pid=None):
107 if pid is None:
108 # We just duplicate the handle in the current process and
109 # let the receiving process steal the handle.
110 pid = os.getpid()
111 proc = _winapi.OpenProcess(_winapi.PROCESS_DUP_HANDLE, False, pid)
112 try:
113 self._handle = _winapi.DuplicateHandle(
114 _winapi.GetCurrentProcess(),
115 handle, proc, access, False, 0)
116 finally:
117 _winapi.CloseHandle(proc)
118 self._access = access
119 self._pid = pid
120
121 def detach(self):
122 '''Get the handle. This should only be called once.'''

Callers 1

__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected