diff options
author | Georg Brandl <georg@python.org> | 2010-10-17 06:21:59 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-10-17 06:21:59 (GMT) |
commit | 17ef0d51d74be30306ceadfdb7f033e82a891670 (patch) | |
tree | f7e3b199948085eef1ade259ddb9e8308ec86d51 /Doc/library/multiprocessing.rst | |
parent | feedda2bab051f72a98e03c3ab90eb4c1d70abbd (diff) | |
download | cpython-17ef0d51d74be30306ceadfdb7f033e82a891670.zip cpython-17ef0d51d74be30306ceadfdb7f033e82a891670.tar.gz cpython-17ef0d51d74be30306ceadfdb7f033e82a891670.tar.bz2 |
Note that maxtasksperchild is new in 3.2.
Diffstat (limited to 'Doc/library/multiprocessing.rst')
-rw-r--r-- | Doc/library/multiprocessing.rst | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst index 09d6de9..65c64e1 100644 --- a/Doc/library/multiprocessing.rst +++ b/Doc/library/multiprocessing.rst @@ -1559,20 +1559,21 @@ with the :class:`Pool` class. *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]]) |