Asynchronous timeouts with CompletableFutures in Java 8 and Java 9
Java 8 introduced CompletableFuture<T>
as an enhancement to Future<T>
. It is a new class which lets you express the flow of information from different tasks using a callback driven style. A CompletableFuture
is used for defining computations on singular events, which is a different use case than computations on streams of events (e.g. Observable
using RxJava). In this article, you will learn about the problem with timeouts in Java 8's CompletableFuture and the improvements that Java 9 brings.
Read full article from Asynchronous timeouts with CompletableFutures in Java 8 and Java 9
No comments:
Post a Comment