async

Converting old Java Future to CompletableFuture

Many Java async libraries still do not support the CompletableFuture, so, sometimes you will need to handle the old Java Future. The problem is: it has no callback methods. You definatelly need to block to get a result and it really (REALLY) sucks. This post is basically to show an easy way to convert the old Future into the new CompletableFuture, without any libraries, with only plain Java. We know that the Java Future interface does not have any callback method, so, the easier way to check whenever the future…

Keep reading