CompletableFuture<Boolean> addThreads(Collection<ThreadReferenceProxyImpl> threads, @Nullable Comparator<? super JavaExecutionStack> comparator, boolean last) {
        List<CompletableFuture<JavaExecutionStack>> futures = new ArrayList<>();
        for (ThreadReferenceProxyImpl thread : threads) {
          if (container.isObsolete()) {
            return CompletableFuture.completedFuture(false);
          }
          if (thread != null && myAddedThreads.add(thread)) {
            futures.add(JavaExecutionStack.create(thread, myDebugProcess, thread == myThread));
          }
        }
        return DebuggerUtilsAsync.reschedule(CompletableFuture.allOf(futures.toArray(CompletableFuture[]::new))).thenApply(__ -> {
          if (!container.isObsolete()) {
            StreamEx<JavaExecutionStack> stacks = StreamEx.of(futures).map(CompletableFuture::join);
            if (comparator != null) {
              stacks = stacks.sorted(comparator);
            }
            container.addExecutionStack(stacks.toList(), last);
          }
          return true;
        });
      }
CompletableFuture<Boolean> addThreads(Collection<ThreadReferenceProxyImpl> threads, @Nullable Comparator<? super JavaExecutionStack> comparator, boolean last)