[concurrency-interest] Using concurrent to write a load balancer

Kasper Nielsen kav at it.edu
Mon Sep 18 08:41:29 EDT 2006

Robert Bowen wrote:
> Hi Kasper, thanks for the response.
> Yea, I was meaning to look at invokeAny(). My only problem with ExecutiveService is, I still need a mechanism that allows me to launch every thread / task in my pool at the same time, instead of looping through each thread, one at a time, and calling its start() method, and then having it run.

If you use ThreadPoolExecutor you can just prestart all the core threads 
and set the keep alive time to a high value.


More information about the Concurrency-interest mailing list