tmf: Split ITmfStateSystem.waitUntilBuilt() in separate methods
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / statistics / TmfStateStatistics.java
index 76ae92c2e7ce1bc1c1e63e2b58cb0d4de6f329fe..1a2ddedfc1d66484d9dd64f25bf9859f36c7193f 100644 (file)
@@ -214,7 +214,8 @@ public class TmfStateStatistics implements ITmfStatistics {
         final List<Long> list = new LinkedList<>();
         final long increment = (end - start) / nb;
 
-        if (!totalsStats.waitUntilBuilt()) {
+        totalsStats.waitUntilBuilt();
+        if (totalsStats.isCancelled()) {
             return list;
         }
 
@@ -450,8 +451,10 @@ public class TmfStateStatistics implements ITmfStatistics {
      * @return If both state systems were built successfully
      */
     private boolean waitUntilBuilt() {
-        boolean check1 = totalsStats.waitUntilBuilt();
-        boolean check2 = typesStats.waitUntilBuilt();
+        totalsStats.waitUntilBuilt();
+        typesStats.waitUntilBuilt();
+        boolean check1 = !totalsStats.isCancelled();
+        boolean check2 = !typesStats.isCancelled();
         return (check1 && check2);
     }
 
This page took 0.024068 seconds and 5 git commands to generate.