CompletableFuture<Void> (EventSet eventSet) { if (eventSet instanceof EventSetImpl && isAsyncEnabled()) { return ((EventSetImpl)eventSet).resumeAsync(); } return toCompletableFuture(() -> eventSet.resume()); }