]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/ReadEntry.java
DB request scheduling scheme fails with district diagrams
[simantics/platform.git] / bundles / org.simantics.db.impl / src / org / simantics / db / impl / query / ReadEntry.java
index 72f132288bf79990c5bf56ce591463993ccd8acd..8f547d22b3e950a9c3b87e035fd9a0e07a4aef08 100644 (file)
@@ -100,10 +100,10 @@ public final class ReadEntry<T> extends CacheEntryBase<AsyncProcedure<T>> implem
 
         AsyncProcedure<T> procedure = entry != null ? entry : procedure_;
 
-        ReadGraphImpl queryGraph = graph.withParent(entry);
+        ReadGraphImpl queryGraph = graph.withParent(entry, null, needsToBlock);
         queryGraph.asyncBarrier.inc();
 
-        ReadGraphImpl executeGraph = graph.withParent(graph.parent);
+        ReadGraphImpl executeGraph = graph.withParent(graph.parent, null, needsToBlock);
         executeGraph.asyncBarrier.inc();
         
         try {
@@ -139,7 +139,8 @@ public final class ReadEntry<T> extends CacheEntryBase<AsyncProcedure<T>> implem
             } finally {
  
                 executeGraph.asyncBarrier.dec();
-                executeGraph.asyncBarrier.waitBarrier(procedure, executeGraph);
+                if(needsToBlock)
+                    executeGraph.asyncBarrier.waitBarrier(procedure, executeGraph);
 
             }