> But what are you gaining, really [by using a boolean flag instead of an
> Event]?
I agree Chris, the Event is better and it certainly does not add much
if any overhead. Thanks for the response.
~ Daniel
--
http://mail.python.org/mailman/listinfo/python-list
On 27 Feb 2007 13:37:12 -0800, Daniel <[EMAIL PROTECTED]> wrote:
> I have a class similar to this:
>
>
> class MyThread(threading.Thread):
>
> def __init__(self):
> self.terminated = False
>
> def run(self):
> while not self.terminated:
> pass # do stuff here
>
>
I have a class similar to this:
class MyThread(threading.Thread):
def __init__(self):
self.terminated = False
def run(self):
while not self.terminated:
pass # do stuff here
def join(self):
self.terminated = True
threading.Thread.join(self