Re: Terminateable thread

2006-06-08 Thread Diez B. Roggisch
Laszlo Nagy wrote: > > I wote a TThread class that is 'soft terminateable'. For example: > > class MyProcessor(TThread): > def run(self): >while not self.terminated(): > self.process_one_item() > > > My question is that, do I really need to use events for this? Because

Terminateable thread

2006-06-08 Thread Laszlo Nagy
'mythread.terminate()'. Please advise. Laszlo -- from thread import * from threading import * class TermMixIn(object): """Terminateable thread mixin class. Methods in this class are thread safe and can be used to implement softly