April 2017
Intermediate to advanced
594 pages
25h 15m
English
We can use a CompletableFuture object with two main purposes:
In this example, we made both uses of the CompletableFuture class. First, we created an instance of this class and sent it as a parameter to a SeedGenerator task. This task uses the complete() method to send the calculated value, and the main() method uses the get() method to obtain the value. The get() method sleeps the current thread until CompletableFuture has been completed. ...
Read now
Unlock full access