On Fri, Dec 10, 2010 at 11:36 PM, Thomas Nagy <tnagyemail-mail at 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 | ncoghlan at gmail.com | Brisbane, Australia
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4