code: def stop(self):
          
          self.running = False
          # stop the command server
          try:
              self.commands_thread.kill()
          except:  # noqa e722
              pass
  
          try:
              self.lock.set()
              if self.config["debug"]:
                  self.log("lock set, exiting")
              # run kill() method on all py3status modules
              for module in self.modules.values():
                  module.kill()
          except:  # noqa e722
              pass
docs: Set the Event lock, this will break all threads' loops.