OSDN Git Service

Alter shutdown (again) to try and correct sync on close.
authorRandy Baumgarte <randy@fbn.cx>
Fri, 18 Feb 2011 01:02:31 +0000 (20:02 -0500)
committerRandy Baumgarte <randy@fbn.cx>
Thu, 24 Feb 2011 01:01:05 +0000 (20:01 -0500)
src/cx/fbn/nevernote/NeverNote.java

index aa90656..bb4f480 100644 (file)
@@ -349,7 +349,7 @@ public class NeverNote extends QMainWindow{
                        System.exit(16);
                }
 
-               thread().setPriority(Thread.MAX_PRIORITY);
+//             thread().setPriority(Thread.MAX_PRIORITY);
                
                logger = new ApplicationLogger("nevernote.log");
                logger.log(logger.HIGH, "Starting Application");
@@ -994,14 +994,14 @@ public class NeverNote extends QMainWindow{
                
                syncRunner.addWork("STOP");
                if (!syncRunner.isIdle()) {
-                       try {
+                       //try {
                                logger.log(logger.MEDIUM, "Waiting for syncThread to stop");
                                System.out.println(tr("Synchronizing.  Please be patient."));
-                               syncThread.join();
+                               while (!syncRunner.isIdle());
                                logger.log(logger.MEDIUM, "Sync thread has stopped");
-                       } catch (InterruptedException e1) {
-                               e1.printStackTrace();
-                       }
+                       //} catch (InterruptedException e1) {
+                       //      e1.printStackTrace();
+                       //}
                }
 
                if (encryptOnShutdown) {