On Tue, 15 Aug 2006, Jeff Peery wrote: > hello, how do I stop a thread?
In all the threaded apps I have so far, I've worked with Queues to give them work. So my technique has been to put a special-purpose element on the Queue, which is recognized by the thread, which exits. I usually have multiple threads accessing the Queue (or what's the point?), so before exiting, the ending thread requeues the "stop" element back onto the Queue it took it from, so that other executing threads can pick it up and process it the same way. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor