summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-06-08 15:21:55 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-06-08 15:21:55 (GMT)
commitdd696496605883a44da983ad81e55a01e996a004 (patch)
tree505cc588dc520311ff2935b8804c04663b26c054 /Doc
parent4a5e5de03f47b7076fc0eabc9817a59efd20049d (diff)
downloadcpython-dd696496605883a44da983ad81e55a01e996a004.zip
cpython-dd696496605883a44da983ad81e55a01e996a004.tar.gz
cpython-dd696496605883a44da983ad81e55a01e996a004.tar.bz2
Issue #9205: concurrent.futures.ProcessPoolExecutor now detects killed
children and raises BrokenProcessPool in such a situation. Previously it would reliably freeze/deadlock.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/concurrent.futures.rst19
1 files changed, 19 insertions, 0 deletions
diff --git a/Doc/library/concurrent.futures.rst b/Doc/library/concurrent.futures.rst
index e5d13f3..3bd4531 100644
--- a/Doc/library/concurrent.futures.rst
+++ b/Doc/library/concurrent.futures.rst
@@ -169,6 +169,12 @@ to a :class:`ProcessPoolExecutor` will result in deadlock.
of at most *max_workers* processes. If *max_workers* is ``None`` or not
given, it will default to the number of processors on the machine.
+ .. versionchanged:: 3.3
+ When one of the worker processes terminates abruptly, a
+ :exc:`BrokenProcessPool` error is now raised. Previously, behaviour
+ was undefined but operations on the executor or its futures would often
+ freeze or deadlock.
+
.. _processpoolexecutor-example:
@@ -369,3 +375,16 @@ Module Functions
:pep:`3148` -- futures - execute computations asynchronously
The proposal which described this feature for inclusion in the Python
standard library.
+
+
+Exception classes
+-----------------
+
+.. exception:: BrokenProcessPool
+
+ Derived from :exc:`RuntimeError`, this exception class is raised when
+ one of the workers of a :class:`ProcessPoolExecutor` has terminated
+ in a non-clean fashion (for example, if it was killed from the outside).
+
+ .. versionadded:: 3.3
+