What is the difference between thenApply and thenApplyAsync of Java CompletableFuture?
The difference has to do with the Executor that is responsible for running the code. Each operator on CompletableFuture generally has 3 versions. thenApply(fn) – runs fn on a thread defined by the CompleteableFuture on which it is called, so you generally cannot know where this will be executed. It might immediately execute if the … Read more