1 min read

Let My Future be Complete...

Mallim

Introduction

I have tried and put up some examples at https://github.com/mallim/java101 (look for completablefuture package).

On my laptop, RealLifeWithoutCompletableFutureExample took 15087 ms and RealLifeCompletableFutureExample 5098 ms.

Hmm.. so there is a a difference.

Parallel Stream --> CompletableFuture

Spring @Async with CompletableFuture

Nthreads) = Ncpu * Ucpu * (1 + W/C) Ncpu - number of cpus Ucpu - cpu utilization W/C - ration of wait to compute time