OSDN Git Service

Add interrupt to index thread in case it becomes hung.
authorRandy Baumgarte <randy@fbn.cx>
Tue, 11 Jan 2011 17:38:26 +0000 (12:38 -0500)
committerRandy Baumgarte <randy@fbn.cx>
Sun, 30 Jan 2011 13:35:48 +0000 (08:35 -0500)
src/cx/fbn/nevernote/NeverNote.java

index 5842a5c..988ae34 100644 (file)
@@ -963,8 +963,10 @@ public class NeverNote extends QMainWindow{
                                indexRunner.thread().join(50);
                        if (!indexRunner.thread().isAlive())
                                logger.log(logger.MEDIUM, "Index thread has stopped");
-                       else
-                               logger.log(logger.MEDIUM, "Index thread still running - bypassing");
+                       else {
+                               logger.log(logger.MEDIUM, "Index thread still running - interrupting");
+                               indexRunner.thread().interrupt();
+                       }
                } catch (InterruptedException e1) {
                        e1.printStackTrace();
                }