]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/UndoRedoSupportImpl.java
Trying to wait for procedures
[simantics/platform.git] / bundles / org.simantics.db.procore / src / fi / vtt / simantics / procore / internal / UndoRedoSupportImpl.java
index 8b939041031671de5ea875e1cd1f1793464bc44e..f2061cd427295f8488f161e72d7d7ec17bcb2f9b 100644 (file)
@@ -44,9 +44,9 @@ public class UndoRedoSupportImpl implements UndoRedoSupport {
         final Operation fop = (Operation)ops.toArray()[0];
         final DataContainer<Long> id = new DataContainer<Long>(0L);
         final TaskHelper th = new TaskHelper("Undo");
-        session.requestManager.scheduleWrite(new SessionTask(null, 0) {
+        session.requestManager.scheduleWrite(new SessionTask(null) {
             @Override
-            public void run(int thread) {
+            public void run0(int thread) {
                 session.flushCounter = 0;
                 session.clusterStream.reallyFlush();
                 ClientChangesImpl cs = new ClientChangesImpl(session);
@@ -106,6 +106,8 @@ public class UndoRedoSupportImpl implements UndoRedoSupport {
                         e.printStackTrace();
                     Logger.defaultLogError(e);
                     th.throwableSet(e);
+                } finally {
+                    cs.dispose();
                 }
             }
         });