On 06/17/2010 03:26 PM, Sim IJskes - QCG wrote:
So this would be an implementation that will mimmick the old behaviour?
ThreadFactory tf = new DaemonThreadFactory();
execSvc = new ThreadPoolExecutor(0, maxThreads, 15L, TimeUnit.MINUTES,
new LinkedBlockingQueue<Runnable>(1), tf, new AbortPolicy() );
execSvc.allowCoreThreadTimeOut(true);
maxThreads is the limit on the number of threads.
And a possible improvement would be:
tpe = new ThreadPoolExecutor(maxThreads, maxThreads, 15,
TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), tf, new
AbortPolicy() );
tpe.allowCoreThreadTimeOut(true);
Gr. Sim