CompletableFuture<Void> (ThreadReference thread) { if (thread instanceof ThreadReferenceImpl && isAsyncEnabled()) { return ((ThreadReferenceImpl)thread).resumeAsync(); } return toCompletableFuture(() -> thread.resume()); }