How can I create a thread pool?
Created Jul 31, 2005
John Zukowski The Executors class of the java.util.concurrent class offers newCachedThreadPool(), newCachedThreadPool(ThreadFactory threadFactory), newFixedThreadPool(int nThreads), newFixedThreadPool(int nThreads, ThreadFactory threadFactory), newScheduledThreadPool(int corePoolSize), and newScheduledThreadPool(int corePoolSize, ThreadFactory threadFactory) for creating an ExecutorService to use as a thread pool. Just give the pool a Runnable object to run with its execute() method.