| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
is not None or a positive int (GH-93364)
Closes #83658.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- concurrent.futures
- ctypes
- http.cookies
- multiprocessing
- queue
- tempfile
- unittest.case
- urllib.parse
|
|
|
|
|
|
|
|
|
| |
(GH-19009)
When the pull is not used via the context manager or terminate() is called, there is a system in multiprocessing.util that handles finalization of all pools via an atexit handler (the Finalize) class. This class registers the _terminate_pool handler in the registry of finalizers of the module, and that registry is called on interpreter exit via _exit_function. The problem is that the "happy" path with the context manager or manual call to finalize() does some extra steps that _terminate_pool does not. The step that is not executed when the atexit() handler calls _terminate_pool is pinging the _change_notifier queue to unblock the maintenance threads.
This commit moves the notification to the _terminate_pool function so is called from both code paths.
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
status in multiprocessing.Pool (#11488)
* bpo-35493: Use Process.sentinel instead of sleeping for polling worker status in multiprocessing.Pool
* Use self-pipe pattern to avoid polling for changes
* Refactor some variable names and add comments
* Restore timeout and poll
* Use reader object only on wait()
* Recompute worker sentinels every time
* Remove timeout and use change notifier
* Refactor some methods to be overloaded by the ThreadPool, document the cache class and fix typos
|
|
|
|
|
|
|
|
|
| |
Changes in this commit:
1. Use a _strong_ reference between the Pool and associated iterators
2. Rework PR #8450 to eliminate a cycle in the Pool.
There is no test in this commit because any test that automatically tests this behaviour needs to eliminate the pool before joining the pool to check that the pool object is garbaged collected/does not hang. But doing this will potentially leak threads and processes (see https://bugs.python.org/issue35413).
|
|
|
|
| |
multiprocessing.Pool destructor now emits ResourceWarning
if the pool is still running.
|
| |
|
|
|
|
|
| |
* Add multiprocessing.Pool.__repr__() to ease debug
* RUN, CLOSE and TERMINATE constants values are now strings rather
than integer to ease debug
|
|
|
|
| |
multiprocessing.Pool.__enter__() now fails if the pool is not
running: "with pool:" fails if used more than once.
|
|
|
|
|
| |
(GH-8450)" (GH-10971)
This reverts commit 97bfe8d3ebb0a54c8798f57555cb4152f9b2e1d0.
|
| |
|
|
|
| |
Fix a reference issue inside multiprocessing.Pool that caused the pool to remain alive if it was deleted without being closed or terminated explicitly.
|
|
|
|
| |
Where a queue may be invoked from a weakref callback, we need
to use the reentrant SimpleQueue.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Make error message more informative
Replace assertions in error-reporting code with more-informative version that doesn't cause confusion over where and what the error is.
* Additional clarification + get travis to check
* Change from SystemError to TypeError
As suggested in PR comment by @pitrou, changing from SystemError; TypeError appears appropriate.
* NEWS file installation; ACKS addition (will do my best to justify it by additional work)
* Making current AssertionErrors in multiprocessing more informative
* Blurb added re multiprocessing managers.py, queues.py cleanup
* Further multiprocessing cleanup - went through pool.py
* Fix two asserts in multiprocessing/util.py
* Most asserts in multiprocessing more informative
* Didn't save right version
* Further work on multiprocessing error messages
* Correct typo
* Correct typo v2
* Blasted colon... serves me right for trying to work on two things at once
* Simplify NEWS entry
* Update 2017-08-18-17-16-38.bpo-5001.gwnthq.rst
* Update 2017-08-18-17-16-38.bpo-5001.gwnthq.rst
OK, never mind.
* Corrected (thanks to pitrou) error messages for notify
* Remove extraneous backslash in docstring.
|
|
|
| |
This hides unwanted implementation details from tracebacks.
|
|
|
|
|
| |
an exception raised at the very first of an iterable would cause pools behave abnormally
(swallow the exception or hang)
|
|
|
|
|
|
|
|
|
|
| |
* bpo-29861: release references to multiprocessing Pool tasks
Release references to tasks, their arguments and their results as soon
as they are finished, instead of keeping them alive until another task
arrives.
* Comments in test
|
| |
|
|\
| |
| |
| |
| | |
handle exceptions raised by an iterator. Patch by Alon Diamant and Davin
Potts.
|
| |
| |
| |
| |
| | |
handle exceptions raised by an iterator. Patch by Alon Diamant and Davin
Potts.
|
| |
| |
| |
| | |
class name instead of hardcoded one.
|
|/
|
|
| |
primitives.
|
| |
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| | |
This allows different parts of a program to use different methods for
starting processes without interfering with each other.
|
| |
| |
| |
| | |
See http://hg.python.org/sandbox/sbt#spawn
|
| |
| |
| |
| | |
applicable.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| | |
traceback raised when pool task raises an exception.
|
|/ |
|
|
|
|
| |
Patch by Janne Karila.
|
| |
|
| |
|
|\ |
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Initial patch by mouad
|
| |
| |
| |
| | |
Patch by Charles-François Natali
|
| |
| |
| |
| | |
instead of BSD licence.
|
|/
|
|
|
|
| |
itertools.starmap()) to multiprocessing.Pool.
Patch by Hynek Schlawack.
|
| |
|
|
|
|
| |
before all tasks have completed.
|
|
|
|
| |
processes if negative or null.
|