[Python-checkins] r85604 - python/branches/py3k/Doc/library/multiprocessing.rst
georg.brandl
python-checkins at python.org
Sun Oct 17 08:21:59 CEST 2010
Author: georg.brandl
Date: Sun Oct 17 08:21:59 2010
New Revision: 85604
Log:
Note that maxtasksperchild is new in 3.2.
Modified:
python/branches/py3k/Doc/library/multiprocessing.rst
Modified: python/branches/py3k/Doc/library/multiprocessing.rst
==============================================================================
--- python/branches/py3k/Doc/library/multiprocessing.rst (original)
+++ python/branches/py3k/Doc/library/multiprocessing.rst Sun Oct 17 08:21:59 2010
@@ -1559,20 +1559,21 @@
*initializer* is not ``None`` then each worker process will call
``initializer(*initargs)`` when it starts.
- *maxtasksperchild* is the number of tasks a worker process can complete
- before it will exit and be replaced with a fresh worker process, to enable
- unused resources to be freed. The default *maxtasksperchild* is None, which
- means worker processes will live as long as the pool.
+ .. versionadded:: 3.2
+ *maxtasksperchild* is the number of tasks a worker process can complete
+ before it will exit and be replaced with a fresh worker process, to enable
+ unused resources to be freed. The default *maxtasksperchild* is None, which
+ means worker processes will live as long as the pool.
.. note::
- Worker processes within a :class:`Pool` typically live for the complete
- duration of the Pool's work queue. A frequent pattern found in other
- systems (such as Apache, mod_wsgi, etc) to free resources held by
- workers is to allow a worker within a pool to complete only a set
- amount of work before being exiting, being cleaned up and a new
- process spawned to replace the old one. The *maxtasksperchild*
- argument to the :class:`Pool` exposes this ability to the end user.
+ Worker processes within a :class:`Pool` typically live for the complete
+ duration of the Pool's work queue. A frequent pattern found in other
+ systems (such as Apache, mod_wsgi, etc) to free resources held by
+ workers is to allow a worker within a pool to complete only a set
+ amount of work before being exiting, being cleaned up and a new
+ process spawned to replace the old one. The *maxtasksperchild*
+ argument to the :class:`Pool` exposes this ability to the end user.
.. method:: apply(func[, args[, kwds]])
More information about the Python-checkins
mailing list