code: def exit(self):
          
          for t in itervalues(self.thread_list):
              t.stop()
          # Call the father class
          super(Plugin, self).exit()
docs: Overwrite the exit method to close threads.