This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author methane
Recipients methane, yus2047889
Date 2020-01-04.02:06:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1578103575.86.0.321590795311.issue39207@roundup.psfhosted.org>
In-reply-to
Content
> ProcessPoolExecutor does not properly spin down and spin up new processes.

It is because Process "Pool" is for reusing processes.
If you don't want to reuse process, you can use the Process.
https://docs.python.org/3/library/multiprocessing.html#the-process-class

Or you can create ProcessPoolExecutor before starting bunch of jobs and shutdown it after complete the jobs.


> ProcessPoolExecutor also spins up too many processes and ignores the max_workers argument.  An example is my setting max_workers=10,
[snip]
> Instead, ProcessPoolExecutor spawns all 10 max_workers

What "ignores the max_workers argument" means?

And would you create a simple reproducible example?

Old ThreadPoolExecutor had the behavior (#24882).  But ProcessPoolExecutor starts worker processes on demand from old.
History
Date User Action Args
2020-01-04 02:06:15methanesetrecipients: + methane, yus2047889
2020-01-04 02:06:15methanesetmessageid: <1578103575.86.0.321590795311.issue39207@roundup.psfhosted.org>
2020-01-04 02:06:15methanelinkissue39207 messages
2020-01-04 02:06:15methanecreate