code: def stop(self):
          '''
          stop the thread, return after thread stopped
          '''
          self._stop_event.set()
          if self._func_stop_event is not None:
              self._func_stop_event.set()
          self.join(timeout=1)
          if self.isAlive():
              print('Failed to stop thread'f stop(self):
          '''
          stop the thread, return after thread stopped
          '''
          self._stop_event.set()
          if self._func_stop_event is not None:
              self._func_stop_event.set()
          self.join(timeout=1)
          if self.isAlive():
              print('Failed to stop thread')
docs: stop the thread, return after thread stopped