def __set_run_event(self, running):
if self.__RunningEvent.isSet() and (not running):
if self.notifyrun:
self.notifyrun(running)
elif (not self.__RunningEvent.isSet()) and running:
if self.notifyrun:
self.notifyrun(running)
if running:
self.__RunningEvent.set()
self.__RunEndEvent.clear()
else:
self.__RunningEvent.clear()
self.__RunEndEvent.set()
## print 'after clear = ', self.__RunningEvent.isSet()
def reset_target(self, target=None, *args, **kwargs):
threading.Thread.__init__(self, None, target, None, *args, **kwargs)
## self.__set_run_event(False)