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

Method close

Lib/multiprocessing/process.py:179–194  ·  view source on GitHub ↗

Close the Process object. This method releases resources held by the Process object. It is an error to call this method if the child process is still running.

(self)

Source from the content-addressed store, hash-verified

177 return False
178
179 def close(self):
180 '''
181 Close the Process object.
182
183 This method releases resources held by the Process object. It is
184 an error to call this method if the child process is still running.
185 '''
186 if self._popen is not None:
187 if self._popen.poll() is None:
188 raise ValueError("Cannot close a process while it is still running. "
189 "You should first call join() or terminate().")
190 self._popen.close()
191 self._popen = None
192 del self._sentinel
193 _children.discard(self)
194 self._closed = True
195
196 @property
197 def name(self):

Callers

nothing calls this directly

Calls 2

pollMethod · 0.45
discardMethod · 0.45

Tested by

no test coverage detected