07 2018 档案

摘要:ThreadPoolExecutor JDK1.8中对与ThreadPoolExecutor是这么定义的: ThreadPoolExecutor通常使用工厂方法(Executors)来配置执行实例,使用线程池中的线程来执行每一个提交的任务。ThreadPoolExecutor提供了两个主要功能:减少 阅读全文
posted @ 2018-07-10 13:29 枫红知秋寒 阅读(245) 评论(0) 推荐(0)
摘要:BlockingQueue 在分析BlockingQueue之前,先看一下JDK1.8中对于BlockingQueue的注释说明: A {@link java.util.Queue} that additionally supports operations that wait for the qu 阅读全文
posted @ 2018-07-09 16:47 枫红知秋寒 阅读(251) 评论(0) 推荐(0)
摘要:先看一下线程池的基础架构图: (1)创建并返回设置有常用配置字符串的 ExecutorService 的方法。 (2)创建并返回设置有常用配置字符串的 ScheduledExecutorService 的方法。 (3)创建并返回“包装的”ExecutorService 方法,它通过使特定于实现的方法 阅读全文
posted @ 2018-07-09 14:33 枫红知秋寒 阅读(260) 评论(1) 推荐(0)