def stop(self):
    self.running_lock.acquire()
    self.running = False
    self.running_lock.release()
def stop(self):
    self.running_lock.acquire()
    self.running = False
    self.running_lock.release()