ExecutorService线程池(转)
摘要:
原文:http://blog.sina.com.cn/s/blog_6151984a0100krj8.htmlExecutorService 建立多线程的步骤:1。定义线程类class Handler implements Runnable{}2。建立ExecutorService线程池ExecutorService executorService = Executors.newCachedThreadPool();或者int cpuNums = Runtime.getRuntime().availableProcessors();//获取当前系统的CPU 数目ExecutorService 阅读全文
posted @ 2012-07-18 10:46 亭子 阅读(202) 评论(0) 推荐(0) 编辑