摘要: package com.mldn.thread; import java.util.concurrent.ExecutionException; import java.util.concurrent.FutureTask; public class TestMyCallable { public static void main(String[] args) throws Int... 阅读全文
posted @ 2017-09-01 16:12 scwyfy 阅读(127) 评论(0) 推荐(0) 编辑
摘要: //创建线程池对象,管理的线程个数不限 ExecutorService pool = Executors.newCachedThreadPool(); //创建线程池对象,管理指定线程个数 ExecutorService es=Executors.newFixedThreadPool(1); /* 阅读全文
posted @ 2017-09-01 15:39 scwyfy 阅读(113) 评论(0) 推荐(0) 编辑