Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

grep: recover from thread lockups on terminate()

Not sure what causes the lockup, but this seems to recover somewhat gracefully.

Changeset c7511f08ca12

Parent cfd9888f6356

by Steve Borho

Changes to one file · Browse files at c7511f08ca12 Showing diff from parent cfd9888f6356 Diff from another changeset...

 
82
83
84
85
 
 
86
 
87
88
89
 
82
83
84
 
85
86
87
88
89
90
91
@@ -82,8 +82,10 @@
  if event.key() == Qt.Key_Escape:   if self.thread and self.thread.isRunning():   self.thread.terminate() - self.thread.wait() + # This can lockup, so stop waiting after 2sec + self.thread.wait( 2000 )   self.finished() + self.thread = None   else:   self.close()   else: