public static CompletableFuture<List<ThreadReference>> allThreads(VirtualMachine vm) {
    if (vm instanceof VirtualMachineImpl && isAsyncEnabled()) {
      return reschedule(((VirtualMachineImpl)vm).allThreadsAsync());
    }
    return completedFuture(vm.allThreads());
  }
public static CompletableFuture<List<ThreadReference>> allThreads(VirtualMachine vm)