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 Claudiu.Popa
Recipients Christian.Tismer, Claudiu.Popa, aleax, kristjan.jonsson, lemburg, neologix, pitrou, r.david.murray, rhettinger, tim.peters, tinchester
Date 2014-07-20.22:54:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1405896868.21.0.73433074232.issue22013@psf.upfronthosting.co.za>
In-reply-to
Content
This seems indeed like a weaker version of ThreadPoolExecutor. Here's how your example looks with it, not very different and still easy to understand and grasp:


from concurrent.futures import ThreadPoolExecutor
from urllib.request import urlretrieve

with ThreadPoolExecutor(max_workers=3) as executor:
    url = 'http://www.{site}.org/'
    for site in ('perl', 'python', 'jython', 'pypy'):
        future = executor.submit(urlretrieve, url.format(site=site), site)



3 lines without imports and the initialisation of the pool.
History
Date User Action Args
2014-07-20 22:54:28Claudiu.Popasetrecipients: + Claudiu.Popa, lemburg, tim.peters, aleax, rhettinger, pitrou, kristjan.jonsson, r.david.murray, neologix, Christian.Tismer, tinchester
2014-07-20 22:54:28Claudiu.Popasetmessageid: <1405896868.21.0.73433074232.issue22013@psf.upfronthosting.co.za>
2014-07-20 22:54:28Claudiu.Popalinkissue22013 messages
2014-07-20 22:54:28Claudiu.Popacreate