Tag: executorservice

  • Future vs Completable Future in Java

    The best way to run asynchronous threads in Java had been to use the Executor Service framework until Java 8. Executor Service returns a Future object which can be used to retrieve the result of an asynchronous thread. But it comes with few drawbacks. Among the many features introduced in Java 8 , one of…

  • How to implement Concurrency in Java – A very minimalist example

    Let’s say you are implementing a batch service and you want to execute a lot of methods. Let’s assume they are independent functionalities and the output of one is not used by any other methods. Executing them one by one will consume a lot of time. The best strategy is to execute them in parallel.…