def METHOD_NAME(self) -> bool:
    need_schedule = self.cur_thread.is_stop() or (self.icount % QlWindowsThreadManagement.TIME_SLICE) == 0
    switched = False
    if need_schedule:
        # if there is less than one thread, this loop won't run
        for i in range(1, len(self.threads)):
            next_id = (self.cur_thread.id + i) % len(self.threads)
            next_thread = self.threads[next_id]
            # find next thread
            if next_thread.status == THREAD_STATUS.RUNNING and not next_thread.has_waitfor():
                if not self.cur_thread.is_stop():
                    self.cur_thread.suspend()
                next_thread.resume()
                self.cur_thread = next_thread
                switched = True
                break
    return switched