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.

classification
Title: multiprocessing.Pool: Need a way to find out if work are finished.
Type: enhancement Stage: needs patch
Components: Library (Lib) Versions: Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: cjrh, davin, guilherme-pg, jnoller, mozbugbox, xtreak
Priority: normal Keywords: patch

Created on 2011-06-09 13:59 by mozbugbox, last changed 2022-04-11 14:57 by admin.

Files
File name Uploaded Description Edit
12294.patch guilherme-pg, 2012-03-14 18:27 review
Messages (2)
msg137970 - (view) Author: Bugs Fly (mozbugbox) Date: 2011-06-09 13:59
The join() method of Pool blocks. So it is not good for finding out if there are still running workers once the pool is closed.

There should be a method like is_alive() which don't block, similar to what in Process. Or task_left() which return number of task left.
msg155780 - (view) Author: Guilherme Gonçalves (guilherme-pg) Date: 2012-03-14 18:27
I uploaded a patch that adds an is_alive() method to multiprocessing.Pool, along with the associated test and documentation updates.

Please let me know if there are any issues, I'll be glad to rework the patch.
History
Date User Action Args
2022-04-11 14:57:18adminsetgithub: 56503
2018-09-22 17:58:14xtreaksetnosy: + xtreak
2016-10-05 11:53:48petri.lehtinensetnosy: - petri.lehtinen
2016-10-05 09:53:17berker.peksagsetkeywords: - easy
nosy: + davin

versions: + Python 3.7, - Python 3.3
2016-08-20 05:53:46cjrhsetnosy: + cjrh
2012-03-14 18:27:04guilherme-pgsetfiles: + 12294.patch

nosy: + guilherme-pg
messages: + msg155780

keywords: + patch
2011-07-27 10:41:30petri.lehtinensetkeywords: + easy
nosy: + jnoller

stage: test needed -> needs patch
2011-07-24 17:55:44petri.lehtinensetstage: test needed
2011-06-13 13:19:08petri.lehtinensetnosy: + petri.lehtinen

versions: + Python 3.3
2011-06-09 13:59:51mozbugboxcreate