Re: Help on thread pool

2008-05-21 Thread Aahz
In article <[EMAIL PROTECTED]>, Alex <[EMAIL PROTECTED]> wrote: > >In order to understand the concept of threading pool in python I'm >working on a simple single-site web crawler. You can also compare your code against http://www.pythoncraft.com/OSCON2001/ThreadPoolSpider.py -- Aahz ([EMAIL PR

Re: Help on thread pool

2008-05-17 Thread Alex
On May 17, 2:23 pm, Jeff <[EMAIL PROTECTED]> wrote: > Your worker threads wait around forever because there is no place for > them to exit. Queue.get() by default blocks until there is an item in > the queue available. You can do something like this to cause the > worker to quit when the queue is

Re: Help on thread pool

2008-05-17 Thread Jeff
Your worker threads wait around forever because there is no place for them to exit. Queue.get() by default blocks until there is an item in the queue available. You can do something like this to cause the worker to quit when the queue is empty. Just make sure that you fill the queue before start