Re: [Python-Dev] futures API

2010-12-11 Thread Nick Coghlan
On Sun, Dec 12, 2010 at 12:36 PM, Brian Quinlan wrote: > > On Dec 11, 2010, at 6:33 PM, Nick Coghlan wrote: > >> On Sun, Dec 12, 2010 at 6:53 AM, Brian Quinlan wrote: >>> >>> Is it still unclear why it is there? Maybe you could propose some >>> additional >>> documentation. >> >> Did you get my q

Re: [Python-Dev] futures API

2010-12-11 Thread Brian Quinlan
On Dec 11, 2010, at 6:33 PM, Nick Coghlan wrote: On Sun, Dec 12, 2010 at 6:53 AM, Brian Quinlan wrote: Is it still unclear why it is there? Maybe you could propose some additional documentation. Did you get my question the other day as to whether a weakref.WeakKeySet might be a better ch

Re: [Python-Dev] futures API

2010-12-11 Thread Thomas Nagy
--- El sáb, 11/12/10, Brian Quinlan escribió: > > On Dec 11, 2010, at 6:44 AM, Thomas Nagy wrote: > > > --- El vie, 10/12/10, Brian Quinlan escribió: > >> On Dec 10, 2010, at 10:51 AM, Thomas Nagy wrote: > >>> --- El vie, 10/12/10, Brian Quinlan > escribió: > On Dec 10, 2010, at 5:36 AM, Tho

Re: [Python-Dev] futures API

2010-12-11 Thread Nick Coghlan
On Sun, Dec 12, 2010 at 6:53 AM, Brian Quinlan wrote: > Is it still unclear why it is there? Maybe you could propose some additional > documentation. Did you get my question the other day as to whether a weakref.WeakKeySet might be a better choice? I believe you would be able to get rid of the pe

Re: [Python-Dev] futures API

2010-12-11 Thread Steven D'Aprano
Brian Quinlan wrote: On Dec 11, 2010, at 6:44 AM, Thomas Nagy wrote: I have also observed a minor performance degradation with the executor replacement (3 seconds for 5000 work items). The amount of work items processed by unit of time does not seem to be a straight line: http://www.freehac

Re: [Python-Dev] futures API

2010-12-11 Thread Brian Quinlan
On Dec 11, 2010, at 6:44 AM, Thomas Nagy wrote: --- El vie, 10/12/10, Brian Quinlan escribió: On Dec 10, 2010, at 10:51 AM, Thomas Nagy wrote: --- El vie, 10/12/10, Brian Quinlan escribió: On Dec 10, 2010, at 5:36 AM, Thomas Nagy wrote: I have a process running for a long time, and which

Re: [Python-Dev] futures API

2010-12-11 Thread Scott Dial
On 12/11/2010 9:44 AM, Thomas Nagy wrote: > The amount of work items processed by unit of time does not seem to be a > straight line: http://www.freehackers.org/~tnagy/runtime_futures_2.png . Out > of curiosity, what is the "_thread_references" for? > > The source file for the example is in: > h

Re: [Python-Dev] futures API

2010-12-11 Thread Thomas Nagy
--- El vie, 10/12/10, Brian Quinlan escribió: > On Dec 10, 2010, at 10:51 AM, Thomas Nagy wrote: > > --- El vie, 10/12/10, Brian Quinlan escribió: > >> On Dec 10, 2010, at 5:36 AM, Thomas Nagy wrote: > >>> I have a process running for a long time, and > which > >> may use futures of different max_w

Re: [Python-Dev] futures API

2010-12-10 Thread Nick Coghlan
On Sat, Dec 11, 2010 at 6:07 AM, Brian Quinlan wrote: >> The problem also occurs when using a callback: >> http://www.freehackers.org/~tnagy/futures_test2.py >> >> If it is necessary to catch KeyboardInterrupt exceptions to cancel the >> futures execution, then how about adding this detail to the

Re: [Python-Dev] futures API

2010-12-10 Thread Brian Quinlan
On Dec 10, 2010, at 11:39 AM, Thomas Nagy wrote: --- El vie, 10/12/10, Thomas Nagy escribió: --- El vie, 10/12/10, Brian Quinlan escribió: On Dec 10, 2010, at 5:36 AM, Thomas Nagy wrote: I have a process running for a long time, and which may use futures of different max_workers count. I

Re: [Python-Dev] futures API

2010-12-10 Thread Thomas Nagy
--- El vie, 10/12/10, Thomas Nagy escribió: > --- El vie, 10/12/10, Brian Quinlan > escribió: > > On Dec 10, 2010, at 5:36 AM, Thomas Nagy wrote: > > > I have a process running for a long time, and > which > > may use futures of different max_workers count. I > think it > > is not too far-fetched

Re: [Python-Dev] futures API

2010-12-10 Thread Brian Quinlan
On Dec 10, 2010, at 10:51 AM, Thomas Nagy wrote: --- El vie, 10/12/10, Brian Quinlan escribió: On Dec 10, 2010, at 5:36 AM, Thomas Nagy wrote: I have a process running for a long time, and which may use futures of different max_workers count. I think it is not too far-fetched to create a new

Re: [Python-Dev] futures API

2010-12-10 Thread Thomas Nagy
--- El vie, 10/12/10, Brian Quinlan escribió: > On Dec 10, 2010, at 5:36 AM, Thomas Nagy wrote: > > I have a process running for a long time, and which > may use futures of different max_workers count. I think it > is not too far-fetched to create a new futures object each > time. Yet, the executi

Re: [Python-Dev] futures API

2010-12-10 Thread Brian Quinlan
Oops. I accidentally replied off-list: On Dec 10, 2010, at 5:36 AM, Thomas Nagy wrote: --- El jue, 9/12/10, Brian Quinlan escribió: On Dec 9, 2010, at 4:26 AM, Thomas Nagy wrote: I am looking forward to replacing a piece of code (http://code.google.com/p/waf/source/browse/trunk/waflib/Runner

Re: [Python-Dev] futures API

2010-12-10 Thread Nick Coghlan
On Fri, Dec 10, 2010 at 11:36 PM, Thomas Nagy 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 gr

Re: [Python-Dev] futures API

2010-12-10 Thread Thomas Nagy
--- El jue, 9/12/10, Brian Quinlan escribió: > On Dec 9, 2010, at 4:26 AM, Thomas Nagy wrote: > > > I am looking forward to replacing a piece of code > > (http://code.google.com/p/waf/source/browse/trunk/waflib/Runner.py#86) > by the futures module which was announced in python 3.2 > beta. I am a

Re: [Python-Dev] futures API

2010-12-09 Thread Brian Quinlan
On Dec 9, 2010, at 2:39 PM, Raymond Hettinger wrote: On Dec 9, 2010, at 9:02 AM, Brian Quinlan wrote: On Dec 9, 2010, at 4:26 AM, Thomas Nagy wrote: Hello, I am looking forward to replacing a piece of code (http://code.google.com/p/waf/source/browse/trunk/waflib/Runner.py#86 ) by the fu

Re: [Python-Dev] futures API

2010-12-09 Thread Raymond Hettinger
On Dec 9, 2010, at 9:02 AM, Brian Quinlan wrote: > > On Dec 9, 2010, at 4:26 AM, Thomas Nagy wrote: > >> Hello, >> >> I am looking forward to replacing a piece of code >> (http://code.google.com/p/waf/source/browse/trunk/waflib/Runner.py#86) by >> the futures module which was announced in py

Re: [Python-Dev] futures API

2010-12-09 Thread Brian Quinlan
On Dec 9, 2010, at 4:26 AM, Thomas Nagy wrote: Hello, I am looking forward to replacing a piece of code (http://code.google.com/p/waf/source/browse/trunk/waflib/Runner.py#86 ) by the futures module which was announced in python 3.2 beta. I am a bit stuck with it, so I have a few questions a

Re: [Python-Dev] futures API

2010-12-09 Thread Michael Foord
On 09/12/2010 16:36, Brett Cannon wrote: On Thu, Dec 9, 2010 at 04:26, Thomas Nagy wrote: Hello, I am looking forward to replacing a piece of code (http://code.google.com/p/waf/source/browse/trunk/waflib/Runner.py#86) by the futures module which was announced in python 3.2 beta. I am a bit s

Re: [Python-Dev] futures API

2010-12-09 Thread Brett Cannon
On Thu, Dec 9, 2010 at 04:26, Thomas Nagy wrote: > Hello, > > I am looking forward to replacing a piece of code > (http://code.google.com/p/waf/source/browse/trunk/waflib/Runner.py#86) by the > futures module which was announced in python 3.2 beta. I am a bit stuck with > it, so I have a few qu

[Python-Dev] futures API

2010-12-09 Thread Thomas Nagy
Hello, I am looking forward to replacing a piece of code (http://code.google.com/p/waf/source/browse/trunk/waflib/Runner.py#86) by the futures module which was announced in python 3.2 beta. I am a bit stuck with it, so I have a few questions about the futures: 1. Is the futures API frozen? 2.