Message290923
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. |
|
Date |
User |
Action |
Args |
2017-03-31 16:35:59 | s3rvac | set | recipients:
+ s3rvac |
2017-03-31 16:35:59 | s3rvac | set | messageid: <1490978159.71.0.789108610011.issue29954@psf.upfronthosting.co.za> |
2017-03-31 16:35:59 | s3rvac | link | issue29954 messages |
2017-03-31 16:35:59 | s3rvac | create | |
|