filmov
tv
Applying Basic Java CompletableFuture Features

Показать описание
This video provides an overview of the basic features of Java's CompletableFuture, using the context of BigFraction objects as a demonstration. Initially, an "incomplete" CompletableFuture is created, akin to a "doughnut without a hole," meaning it lacks a value. A traditional Java thread is then initiated to perform background computations, specifically multiplying two BigFraction objects. After the computation is complete, the CompletableFuture is explicitly finalized with its result using the complete method. Despite these capabilities, I point out the limitations (such as blocking calls and inability to fluently handle asynchronous results) of restricting programs to use only basic features of CompletableFuture,. To overcome these drawbacks, I recommend exploring advanced features of CompletableFuture, which are covered in subsequent videos.