摘要: http://www.cnblogs.com/dolphin0520/p/3949310.html 一.Callable与Runnable 二.Future 三.FutureTask 四.使用示例 一.Callable与Runnable 先说一下java.lang.Runnable吧,它是一个接口, 阅读全文
posted @ 2016-02-20 23:00 YDDMAX 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 1、Executor是任务执行器,该接口里面只含有一个方法。原来创建新的线程都是采用new Thread(new Runnable())的方式创建,该接口将原来提交任务的方式进行了进一步的抽象。 /** * Executes the given command at some time in the 阅读全文
posted @ 2016-02-20 22:47 YDDMAX 阅读(234) 评论(0) 推荐(0) 编辑