Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b3c4b98

Browse files
committed
Issue #17273: Clarify that pool methods can only be used by parent process.
1 parent 8d37954 commit b3c4b98

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Doc/library/multiprocessing.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ For example::
284284
print(result.get(timeout=1)) # prints "100" unless your computer is *very* slow
285285
print(pool.map(f, range(10))) # prints "[0, 1, 4,..., 81]"
286286

287+
Note that the methods of a pool should only ever be used by the
288+
process which created it.
289+
287290

288291
Reference
289292
---------
@@ -1665,6 +1668,9 @@ with the :class:`Pool` class.
16651668
*initializer* is not ``None`` then each worker process will call
16661669
``initializer(*initargs)`` when it starts.
16671670

1671+
Note that the methods of the pool object should only be called by
1672+
the process which created the pool.
1673+
16681674
.. versionadded:: 3.2
16691675
*maxtasksperchild* is the number of tasks a worker process can complete
16701676
before it will exit and be replaced with a fresh worker process, to enable

0 commit comments

Comments
 (0)