]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.impl/src/org/simantics/db/impl/graph/ReadGraphImpl.java
Trying to wait for procedures
[simantics/platform.git] / bundles / org.simantics.db.impl / src / org / simantics / db / impl / graph / ReadGraphImpl.java
index c95cd93d94c836e4455a98fbed12b97176ffb47d..77af46d557e740e8d73e4bc9c9252b2adb7e7a98 100644 (file)
@@ -2048,21 +2048,6 @@ public class ReadGraphImpl implements AsyncReadGraph {
 
        }
 
-       final private <T> void syncRequest(final AsyncRead<T> request, final AsyncReadProcedure<T> procedure) throws DatabaseException {
-
-               assert (request != null);
-
-               ListenerBase listener = getListenerBase(procedure);
-               assert(listener == null);
-
-               BlockingAsyncProcedure<T> ap = new BlockingAsyncProcedure<>(this, procedure, request);
-
-               QueryCache.runnerAsyncReadEntry(this, request, parent, listener, ap, true);
-
-               ap.get();
-
-       }
-
        @Override
        public <T> T syncRequest(AsyncRead<T> request,
                        final SyncProcedure<T> procedure) throws DatabaseException {
@@ -5173,7 +5158,7 @@ public class ReadGraphImpl implements AsyncReadGraph {
                processor.schedule(new SessionTask(this) {
 
                        @Override
-                       public void run(int thread) {
+                       public void run0(int thread) {
                                try {
                                        final ListenerBase listener = getListenerBase(procedure);
                                        QueryCache.runnerReadEntry(ReadGraphImpl.this, request, parent, listener, procedure, false);
@@ -5253,7 +5238,7 @@ public class ReadGraphImpl implements AsyncReadGraph {
                processor.schedule(new SessionTask(this) {
 
                        @Override
-                       public void run(int thread) {
+                       public void run0(int thread) {
                                try {
                                        final ListenerBase listener = getListenerBase(procedure);
                                        QueryCache.runnerAsyncReadEntry(ReadGraphImpl.this, request, parent, listener, procedure, false);
@@ -5644,7 +5629,7 @@ public class ReadGraphImpl implements AsyncReadGraph {
                this.parentGraph = parentGraph;
                this.parent = parent;
                this.processor = support;
-               this.asyncBarrier = new AsyncBarrierImpl(parentGraph != null ? parentGraph.asyncBarrier : null);
+               this.asyncBarrier = new AsyncBarrierImpl(parentGraph != null ? parentGraph.asyncBarrier : null, parent);
        }
 
        ReadGraphImpl(ReadGraphImpl graph, CacheEntry parent) {