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 s3rvac
Recipients s3rvac
Date 2017-03-31.16:35:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1490978159.71.0.789108610011.issue29954@psf.upfronthosting.co.za>
In-reply-to
Content
multiprocessing.Pool.__exit__() calls terminate() instead of close(). Why? Wouldn't it be better (and more expected from a user's point of view) if it called close()?

Reasons:

- Calling close() would wait until all tasks are completed before shutting down the pool instead of terminating them abruptly when some of them may still be running.

- concurrent.futures.ProcessPoolExecutor.__exit__() calls shutdown(wait=True), which waits until all tasks are finished. In this regard, the behavior of Pool.__exit__() is inconsistent.

See also this comment by Dan O'Reilly (http://bugs.python.org/msg242120), who expressed an identical concern two years ago.
History
Date User Action Args
2017-03-31 16:35:59s3rvacsetrecipients: + s3rvac
2017-03-31 16:35:59s3rvacsetmessageid: <1490978159.71.0.789108610011.issue29954@psf.upfronthosting.co.za>
2017-03-31 16:35:59s3rvaclinkissue29954 messages
2017-03-31 16:35:59s3rvaccreate