Threading Pool Event()

Peter Hansen peter at engcorp.com
Sat Jul 19 16:10:56 CEST 2003


Graeme Matthew wrote:
> 
> ok so code like this is perfectly safe
> 
> def run(self):
> 
>     while 1:
> 
>         job = queue.get()
> 
>         __processjob()

It's almost like you aren't even seeing Aahz' replies. ;-)

The above is certainly safe, but can't be terminated easily.
Just use the loop Aahz showed, which is the above plus the
ability to terminate.

-Peter




More information about the Python-list mailing list