public CompletableFuture<Collection<ThreadReferenceProxyImpl>> allThreadsAsync() {
    DebuggerManagerThreadImpl.assertIsManagerThread();
    if (myAllThreadsDirty) {
      return DebuggerUtilsAsync.allThreads(myVirtualMachine).thenApply(threads -> {
        DebuggerManagerThreadImpl.assertIsManagerThread();
        threads.forEach(thread -> getThreadReferenceProxy(thread, true)); // add proxies
        myAllThreadsDirty = false;
        return new ArrayList<>(myAllThreads.values());
      });
    }

    return CompletableFuture.completedFuture(new ArrayList<>(myAllThreads.values()));
  }
public CompletableFuture<Collection<ThreadReferenceProxyImpl>> allThreadsAsync()