I’m having trouble returning car price value using getPrice() method because of the following error: I want getPrice return CompletableFuture<Double> but instead it returns CompletableFuture<CompletableFuture<Double>> because I’m returning a value from a nested future. I could ca…
Tag: future
Executor service returning incorrect response
I am creating future list from a list of calls to executor service submit method based on student ID. The response from service is not returning for all studentId’s. It runs for the right number of times but the studentId getting used in service call is either first or last. It is ignoring the middle on…
What’s the difference between a Future and a Promise?
What’s the difference between Future and Promise? They both act like a placeholder for future results, but where is the main difference?