[Python-Dev] futures API (original) (raw)

Nick Coghlan ncoghlan at gmail.com
Fri Dec 10 18:31:08 CET 2010


On Fri, Dec 10, 2010 at 11:36 PM, Thomas Nagy <tnagyemail-mail at yahoo.fr> wrote:

fut = concurrent.futures.ThreadPoolExecutor(maxworkers=20) for x in range(100): # comment the following line fut = concurrent.futures.ThreadPoolExecutor(maxworkers=20) c = counter(fut) c.run() """ The runtime grows after each step: Is there a mistake in this piece of code?

This isn't an "overhead" question, it's a "how prompt is the resource release" question.

Given that you've created circular references between the futures and your counter class, the answer is probably "not prompt at all".

Cheers, Nick.

-- Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-Dev mailing list