def remove_stopped_threads ( self ) : self . threads = [ t for t in self . threads if t . is_alive ( ) ]
python thread list won't clear
Remove the stopped threads from the internal thread list .
def remove_stopped_threads (self):
        """Remove the stopped threads from the internal thread list."""
        self.threads = [t for t in self.threads if t.is_alive()]