Killing subservient threads

Aahz aahz at
Thu Mar 12 16:34:39 CET 2009

In article <mailman.372.1235151060.11746.python-list at>,
Christian Heimes  <lists at> wrote:
>Gabriel Genellina wrote:
>> 1) make the child window set a flag in the thread (let's say,
>> t.terminate = True). And make the polling thread check the flag
>> periodically (you possibly already have a loop there - just break the
>> loop when you detect that self.terminate became true)
>threading.Condition() and threading.Event() are especially designed for
>the job. Please use them appropriately.

Personally, I prefer to just use Queue for everything.  See
for examples, including one with Tkinter.

Side note: because of the Subject: line, I have to mention a website for
those who haven't seen it (requires Flash enabled):
Aahz (aahz at           <*>

"All problems in computer science can be solved by another level of     
indirection."  --Butler Lampson

More information about the Python-list mailing list