1 45 46 package org.exolab.jms.net.util; 47 48 49 import EDU.oswego.cs.dl.util.concurrent.PooledExecutor; 50 51 52 58 public class ThreadPool extends PooledExecutor { 59 60 67 public ThreadPool(String name, int maxPoolSize) { 68 this(name, maxPoolSize, false); 69 } 70 71 79 public ThreadPool(String name, int maxPoolSize, boolean daemon) { 80 this(new ThreadGroup (name), name, maxPoolSize, daemon); 81 } 82 83 90 public ThreadPool(ThreadGroup group, String name, int maxPoolSize) { 91 this(group, name, maxPoolSize, false); 92 } 93 94 103 public ThreadPool(ThreadGroup group, String name, int maxPoolSize, 104 boolean daemon) { 105 super(maxPoolSize); 106 setThreadFactory(new ThreadFactory(group, name + "-Worker-", daemon)); 107 } 108 109 } 110 | Popular Tags |