]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.browsing.ui.common/src/org/simantics/browsing/ui/common/internal/GECache.java
Fix livelock situation in QueryProcessor
[simantics/platform.git] / bundles / org.simantics.browsing.ui.common / src / org / simantics / browsing / ui / common / internal / GECache.java
index b5545df0065264423b0bf9d240679a94063d05aa..014a5c0d54b37c0fbd06810137ca04b83a9f88f9 100644 (file)
@@ -174,13 +174,13 @@ public class GECache implements IGECache {
     private TObjectIntHashMap<NodeContext> references = new TObjectIntHashMap<NodeContext>();
     
     @Override
-    public void incRef(NodeContext context) {
+    synchronized public void incRef(NodeContext context) {
        int exist = references.get(context);
        references.put(context, exist+1);
     }
     
     @Override
-    public void decRef(NodeContext context) {
+    synchronized public void decRef(NodeContext context) {
        int exist = references.get(context);
        references.put(context, exist-1);
        if(exist == 1) {