Relative Content

Tag Archive for javaconcurrencycompletable-future

How does CompletableFuture know when the task is complete?

CompletableFuture.supplyAsync(() -> otherService.get()) .thenAccept(value -> { // do something }); Is there a infinite loop behind it to check the status? I read some documentation and the answer is “callback”. But when is the “callback” called? I have researched a lot of documents but have not found the answer yet. Can someone help me explain […]