From: Randy Baumgarte Date: Fri, 18 Feb 2011 01:02:31 +0000 (-0500) Subject: Alter shutdown (again) to try and correct sync on close. X-Git-Tag: version0.1.1~197 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=2583258fb708b5b1d477dd2ef09a4d7d940f46ef;p=neighbornote%2FNeighborNote.git Alter shutdown (again) to try and correct sync on close. --- diff --git a/src/cx/fbn/nevernote/NeverNote.java b/src/cx/fbn/nevernote/NeverNote.java index aa90656..bb4f480 100644 --- a/src/cx/fbn/nevernote/NeverNote.java +++ b/src/cx/fbn/nevernote/NeverNote.java @@ -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) {