]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.acorn/src/org/simantics/acorn/lru/LRU.java
Workaround fix for acorn mutex printing for now
[simantics/platform.git] / 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++;
                     }
 
                 }