Message247766
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") |
|
Date |
User |
Action |
Args |
2015-07-31 19:55:13 | Pat Riehecky | set | recipients:
+ Pat Riehecky |
2015-07-31 19:55:13 | Pat Riehecky | set | messageid: <1438372513.29.0.46812629282.issue24767@psf.upfronthosting.co.za> |
2015-07-31 19:55:13 | Pat Riehecky | link | issue24767 messages |
2015-07-31 19:55:12 | Pat Riehecky | create | |
|