]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/ExternalReadEntry.java
Allow ExternalReadEntry.compute to continue graph handling
[simantics/platform.git] / bundles / org.simantics.db.impl / src / org / simantics / db / impl / query / ExternalReadEntry.java
index 556d5fc3e12b8d2df0d5e42ea2efb2221a8fb65f..419115165f10f4f46a7fb4083847cbaf3a72905c 100644 (file)
@@ -180,14 +180,16 @@ final public class ExternalReadEntry<T> extends CacheEntryBase<AsyncProcedure<T>
        
                try {
                        
-                       ReadGraphImpl queryGraph = graph.withParent(this);
+                       ReadGraphImpl queryGraph = graph.withParent(this, null, true);
+                       queryGraph.asyncBarrier.inc();
 
-                       if(!registered) {
-                               id.register(graph, this);
+                       if (!registered) {
+                               id.register(queryGraph, this);
                                registered = true;
                        }
-                       
-                       queryGraph.asyncBarrier.waitBarrier(id, graph);
+
+                       queryGraph.asyncBarrier.dec();
+                       queryGraph.asyncBarrier.waitBarrier(id, queryGraph);
 
                } catch (Throwable t) {