On Fri, Dec 10, 2010 at 11:36 PM, Thomas Nagy <tnagyemail-m...@yahoo.fr> wrote:
> fut = concurrent.futures.ThreadPoolExecutor(max_workers=20)
> for x in range(100):
>     # comment the following line
>     fut = concurrent.futures.ThreadPoolExecutor(max_workers=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   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to