Core concept

CompletableFuture.supplyAsync(() -> callA())
  .thenApply(this::transform)
  .thenAccept(System.out::println);
Advertisement

How it works

Custom Executor for control. Default is ForkJoinPool.commonPool.

Advertisement

Trade-offs + gotchas

Async workflows. IO + callback style.