Killing threads

Aahz aahz at pythoncraft.com
Sun Apr 5 15:42:46 CEST 2009


In article <53ebfff9-448f-438f-aa93-a2187bf13056 at f1g2000prb.googlegroups.com>,
imageguy  <imageguy1206 at gmail.com> wrote:
>On Apr 4, 10:43=A0pm, ericwoodwo... at gmail.com wrote:
>> 
>> The issue that I'm having is...I don't know how to kill this app in
>> window. 
>
>I am not an expert either, however, I think the standard practice is
>to use and threading.Event to communicate with the threads.

Nope, Eric had the right idea the first time: use Queue.Queue.  And the
reason is precisely because you're not a thread expert; using Queue is
the easiest way to avoid deadlocks and other threading problems.

For more info, see the slides from my thread tutorial:
http://pythoncraft.com/OSCON2001/
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it."  --Brian W. Kernighan



More information about the Python-list mailing list