Threads Dying?

Gabriel Genellina gagsl-py2 at
Fri Jun 29 06:15:05 CEST 2007

En Thu, 28 Jun 2007 15:12:53 -0300, Robert Rawlins - Think Blue  
<robert.rawlins at> escribió:

> I've got an application that seems to be a little bit unstable and  
> freezes
> quite a bit, and I'm suspecting it's something in one of my threads  
> that's
> causing the problem, when does a thread die?

After the run() method finishes, either normally or because an unhandled  
exception happened.

> And how can I be sure that its
> dyeing when its mean to be?

I'm not sure what you are asking - you can check periodically inside run()  
for some condition (an Event object, a special object placed on a Queue,  
even a global variable in the simplest case) and exit when the condition  
is met.

Gabriel Genellina

More information about the Python-list mailing list