From: jsimomaa Date: Fri, 12 May 2017 18:49:34 +0000 (+0300) Subject: Workaround fix for acorn mutex printing for now X-Git-Tag: v1.29.0~53^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=18dfbd8c370a4dd499dad701543977f919d49401;p=simantics%2Fplatform.git Workaround fix for acorn mutex printing for now This needs to be fixed somehow else but just a workaround for now to prevent flooding of prints refs #7175 Change-Id: Ia218bbfc8bd82679fb7f365c706b74c1753a1795 --- diff --git a/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/LRU.java b/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/LRU.java index 80fec7032..690ba426f 100644 --- a/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/LRU.java +++ b/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/LRU.java @@ -556,14 +556,18 @@ public class LRU> { 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++; } }