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