X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.acorn%2Fsrc%2Forg%2Fsimantics%2Facorn%2FOperationQueue.java;h=d48f9ba6da792f6c292f1ac4ac14cf01aaadbd95;hb=refs%2Fheads%2Fprivate%2Fantti2;hp=48b891f0ef4215926adb8f06b099b78e07874630;hpb=63bb6d595c37b3a2fb55e07fb810779cae3b4d03;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.acorn/src/org/simantics/acorn/OperationQueue.java b/bundles/org.simantics.acorn/src/org/simantics/acorn/OperationQueue.java index 48b891f0e..d48f9ba6d 100644 --- a/bundles/org.simantics.acorn/src/org/simantics/acorn/OperationQueue.java +++ b/bundles/org.simantics.acorn/src/org/simantics/acorn/OperationQueue.java @@ -159,22 +159,18 @@ class OperationQueue { */ synchronized long waitFor() { - mainProgram.assertMainProgramThread(); - - // One last check within the monitor - if(!operations.isEmpty() || !tasks.isEmpty()) return 0; + mainProgram.assertMainProgramThread(); - long start = System.nanoTime(); - System.err.println("start =" + start); + // One last check within the monitor + if(!operations.isEmpty() || !tasks.isEmpty()) return 0; - try { - wait(5000); - } catch (InterruptedException e) { - LOGGER.error("Unexpected interruption", e); - } - - return System.nanoTime() - start; + long start = System.nanoTime(); + try { + wait(5000); + } catch (InterruptedException e) { + LOGGER.error("Unexpected interruption", e); + } + return System.nanoTime() - start; } - }