@classmethod
def stop_all_threads(cls):
    """ set the stop_running attribute to True for all threads
            and their workers (if they have one)
        """
    for thread in cls.thread_set:
        worker = thread.worker
        if worker is not None:
            worker.stop_running = True
        thread.stop_running = True
