title: Cannot terminate PyQT QThread
body: <p>This question is related to my <a href="https://stackoverflow.com/questions/30329462/pyqt-qthread-multithreading-does-not-work">previous one</a></p>
  
  <p>Problem occurs where I'm switching between <code>Alpha to Gamma</code> items too fast. The <code>run()</code> method of <code>GenericThread</code> cannot complete it's loop without error since information given to it changes when i'm switching between items of <code>List1</code></p>
  
  <p>I've added <code>exeptions</code> but that's not the best workaround in this situation, I have to terminate the thread if it's running and then start it again, but when i'm terminating it, GUI freezez forever (BUT its not like it freeze all the time while switching between items, sometimes self.terminate() works sometimes not and freezes i cant find out why) ...</p>
  
  <pre><code>class GenericThread(QtCore.QThread):
      def __init__(self, parent=None):
          QtCore.QThread.__init__(self, parent)
  
      def stop(self):
          self.terminate()
  
      def __del__(self):
          self.quit()
          self.wait()
  
      def run(self):
          #Some very long stuff
          self.emit( QtCore.SIGNAL('itemSelectionChanged()'))
          return
  
  class MainUI(QtGui.QMainWindow):
      def __init__(self, parent=None):
          QtGui.QMainWindow.__init__(self)
          self.ui = Ui_Win()
          self.ui.setupUi(self)
  
          self.genericThread = GenericThread(self, listIndex=2)
          self.connect(self.genericThread, QtCore.SIGNAL("fillListWithItems(QString, int)"), self.fillListWithItems )
          self.ui.List1.list1SelectedItem.connect(self.fill_List2)
          ...
  
      def fill_List2(self):
          if self.genericThread.isRunning():
              self.genericThread.stop()
          self.ui.List2.clear()
          list1SelectedItem = str(self.ui.List1.currentItem().text())
          self.genericThread.start()
  </code></pre>
  
  <p>Now, why does GUI freez and how to termiante <code>self.genericThread</code> correctly ?</p>