[issue8486] threading.Event()

Antoine Pitrou report at bugs.python.org
Wed Apr 21 16:07:25 CEST 2010


Antoine Pitrou <pitrou at free.fr> added the comment:

> Using a boolean would look almostly the same so why to reinvent the
> wheel ? :)

Hmm, /you/ are reinventing the wheel by suggesting to use an Event
instead of a simple boolean. Just loop like this:

while not self.stop_me:
   # etc.

and set the stop_me attribute to True when you want to stop your thread.

----------
title: [PATCH] threading.Event() -> threading.Event()

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8486>
_______________________________________


More information about the Python-bugs-list mailing list