Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
17ef0d51
Commit
17ef0d51
authored
Oct 17, 2010
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Note that maxtasksperchild is new in 3.2.
parent
feedda2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
Doc/library/multiprocessing.rst
Doc/library/multiprocessing.rst
+12
-11
No files found.
Doc/library/multiprocessing.rst
View file @
17ef0d51
...
...
@@ -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
]])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment