futuretask ExecutorCompletionService

This time we’ll learn how to start cleanly new threads and to manage thread pools. In Java, if you have a Runnable like this : You can easily run it in a new thread : This is very simple and clean, but what if you’ve several long running tasks that you want to load in…