]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryListening.java
Resolve "A tag with an associated listener causes issues in DelayedWrite
[simantics/platform.git] / bundles / org.simantics.db.impl / src / org / simantics / db / impl / query / QueryListening.java
index 075281035a7802842a2b6ab285700b2a22f29d6b..5a7ab819dad27332af584912ef47ba54a7e25a16 100644 (file)
@@ -413,6 +413,16 @@ public class QueryListening {
 
     public void fireListeners(ReadGraphImpl graph) {
 
+        ReadGraphImpl listenerGraph = graph.forSyncExecute();
+        listenerGraph.asyncBarrier.inc();
+        fireListeners_(listenerGraph);
+        listenerGraph.asyncBarrier.dec();
+        listenerGraph.asyncBarrier.waitBarrier(this, listenerGraph);
+
+    }
+
+    private void fireListeners_(ReadGraphImpl graph) {
+
         assert (!processor.updating);
         assert (!processor.cache.collecting);
         assert (!firingListeners);