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 Pat Riehecky
Recipients Pat Riehecky
Date 2015-07-31.19:55:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1438372513.29.0.46812629282.issue24767@psf.upfronthosting.co.za>
In-reply-to
Content
As a feature request, can the Executor respond to a len() request by showing the number of non-finished/non-canceled items in the pool?

I would like a clean pythonic way of seeing how many items remain to be executed and this seemed the way to go.

psudo-code:

    myvar = list(range(1, 30))

    pool = concurrent.futures.ThreadPoolExecutor(max_workers=2)
    results = pool.map(myfunction, myvar)

    for result in results:
        print("waiting for " + str(len(pool)) + " tasks to finish")
History
Date User Action Args
2015-07-31 19:55:13Pat Rieheckysetrecipients: + Pat Riehecky
2015-07-31 19:55:13Pat Rieheckysetmessageid: <1438372513.29.0.46812629282.issue24767@psf.upfronthosting.co.za>
2015-07-31 19:55:13Pat Rieheckylinkissue24767 messages
2015-07-31 19:55:12Pat Rieheckycreate