Chapter 16. CompletableFuture: composable asynchronous programming

This chapter covers

  • Creating an asynchronous computation and retrieving its result
  • Increasing throughput by using nonblocking operations
  • Designing and implementing an asynchronous API
  • Consuming asynchronously a synchronous API
  • Pipelining and merging two or more asynchronous operations
  • Reacting to the completion of an asynchronous operation

Chapter 15 explored the modern concurrency context: that multiple processing resources (CPU cores and the like) are available, and you want your programs to exploit as many of these resources as possible in a high-level manner (rather than litter your programs with ill-structured, unmaintainable operations on threads). We noted that parallel ...

Get Modern Java in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.