diff options
author | Antoine Pitrou <pitrou@free.fr> | 2017-06-24 17:22:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-24 17:22:23 (GMT) |
commit | 13e96cc596d158b98996db3fa291086ea4afecd9 (patch) | |
tree | e5d5abb7f5364b484ca4396ff99986ccac16ed0c /Doc | |
parent | 0ee32c148119031e19c79359f5c4789ee69fa355 (diff) | |
download | cpython-13e96cc596d158b98996db3fa291086ea4afecd9.zip cpython-13e96cc596d158b98996db3fa291086ea4afecd9.tar.gz cpython-13e96cc596d158b98996db3fa291086ea4afecd9.tar.bz2 |
Fix bpo-30596: Add close() method to multiprocessing.Process (#2010)
* Fix bpo-30596: Add close() method to multiprocessing.Process
* Raise ValueError if close() is called before the Process is finished running
* Add docs
* Add NEWS blurb
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/multiprocessing.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst index 6b4a8cb..5265639 100644 --- a/Doc/library/multiprocessing.rst +++ b/Doc/library/multiprocessing.rst @@ -598,6 +598,16 @@ The :mod:`multiprocessing` package mostly replicates the API of the acquired a lock or semaphore etc. then terminating it is liable to cause other processes to deadlock. + .. method:: close() + + Close the :class:`Process` object, releasing all resources associated + with it. :exc:`ValueError` is raised if the underlying process + is still running. Once :meth:`close` returns successfully, most + other methods and attributes of the :class:`Process` object will + raise :exc:`ValueError`. + + .. versionadded:: 3.7 + Note that the :meth:`start`, :meth:`join`, :meth:`is_alive`, :meth:`terminate` and :attr:`exitcode` methods should only be called by the process that created the process object. |