]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Merge "Workaround fix for acorn mutex printing for now"
authorHannu Niemistö <hannu.niemisto@semantum.fi>
Fri, 12 May 2017 19:50:06 +0000 (22:50 +0300)
committerGerrit Code Review <gerrit2@www.simantics.org>
Fri, 12 May 2017 19:50:06 +0000 (22:50 +0300)
bundles/org.simantics.acorn/src/org/simantics/acorn/lru/LRU.java

index 80fec7032940ac3e7a6a1abbebb02325880a8bfc..690ba426f209afd52035ac875530b1f7e2b3d763 100644 (file)
@@ -556,14 +556,18 @@ public class LRU<MapKey,MapValue extends LRUObject<MapKey, MapValue>> {
                 boolean gotMutex = impl.tryAcquireMutex();
 
                 boolean done = false;
+                // TODO: fix this properly pleease
+                int count = 0;
                 while (!done) {
 
                     if (gotMutex || borrowMutex) {
                         runWithMutex();
                         done = true;
                     } else {
-                        LOGGER.warn("Retry mutex acquire");
+                        if (count % 100 == 0)
+                            LOGGER.warn("Retry mutex acquire");
                         gotMutex = impl.tryAcquireMutex();
+                        count++;
                     }
 
                 }