From 18dfbd8c370a4dd499dad701543977f919d49401 Mon Sep 17 00:00:00 2001 From: jsimomaa Date: Fri, 12 May 2017 21:49:34 +0300 Subject: [PATCH] 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 --- .../src/org/simantics/acorn/lru/LRU.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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++; } } -- 2.43.2