supplyAsync vs runAsync, thenApply (map) vs thenCompose (flatMap), thenCombine for joining two independent results, allOf/anyOf, error recovery with exceptionally vs handle vs whenComplete, the commonPool thread starvation trap for I/O-bound tasks, and building a real async pipeline step by step.
// Lessons
- 01soon
The Problem with Future — Blocking and No Composition
- 02soon
supplyAsync and runAsync — Starting an Async Computation
- 03soon
thenApply and thenCompose — map vs flatMap for Futures
- 04soon
thenCombine — Joining Two Independent Futures
- 05soon
allOf and anyOf — Waiting for Multiple Futures
- 06soon
exceptionally and handle — Error Recovery in the Pipeline
- 07soon
whenComplete — Side Effects Regardless of Success or Failure
- 08soon
Avoiding the commonPool — Custom Executors for I/O-Bound Tasks