Re: Good thread pool module

2006-03-23 Thread Rene Pijlman
Dennis Lee Bieber: >Raymond Hettinger: >> Because of the GIL, thread pools are not as useful in Python as you >> might expect -- they execute one at a time and do not take advantage of >> hyper-threading or multiple processors. If that kind of efficiency is > > If the task is I/O bound (some

Re: Good thread pool module

2006-03-22 Thread Kinsley Turner
> There isn't a thread pool module in the standard library, but I'm sure > many have been written by people in the python community. > Anyone have a favorite? Is there one particular implementation that's > recommended? > > Not looking for anything fancy, just something that lets me queue up >

Re: Good thread pool module

2006-03-22 Thread Raymond Hettinger
David Hirschfield wrote: > There isn't a thread pool module in the standard library, but I'm sure > many have been written by people in the python community. > Anyone have a favorite? Is there one particular implementation that's > recommended? Because of the GIL, thread pools are not as useful in

Re: Good thread pool module

2006-03-22 Thread Steve M
I believe "Python in a Nutshell" has a couple of clear examples using Queue and Threading, including one with a pool of worker threads that wait for entries in one queue and place results in another. Also you should look at the Python Cookbook, which probably includes the same or similar examples

Re: Good thread pool module

2006-03-22 Thread Rune Hansen
I think you want the Queue module in standard lib. Haven't started a thread yet without it :) regards /rune -- http://mail.python.org/mailman/listinfo/python-list