Looking at a the docs and a couple of examples, im still a little confused. I think I get the bare basics of it, but Im confused on when one would use them.
I guess my main questions..
- Are CompletionStage/CompletableFuture both for async code? If so, why would you use one over the other?
- If CompletionStage can be used for non-async code, why even use it at all? How would it be any different than just standard sequential code?
- How are they even different? I see there are asynchronous methods you can call for both CompletionStage and CompletableFuture.
- What scenario would you use one over the other?