2011年10月7日
摘要: 线程池是java5的新特性,用来管理线程public class ThreadPoolTest { /** * @param args */ public static void main(String[] args) { /**创建线程池,固定一次执行三个任务 */// ExecutorService threadPool = Executors.newFixedThreadPool(3); /**创建线程池,非固定,来几个执行几个 */// ExecutorService threadPool = Executors.newCachedThreadPool(); /**创建线... 阅读全文
posted @ 2011-10-07 00:14 victorlinwen 阅读(883) 评论(0) 推荐(0)