摘要: Executors private ExecutorService proThreadPool = Executors.newFixedThreadPool(50); 线程池,就是在调用线程的时候初使化一定数量的线程,有线程过来的时候,先检测初使化的线程还有空的没有,没有就再看当前运行中的线程数是不 阅读全文
posted @ 2016-07-02 19:28 薛晓东 阅读(4839) 评论(0) 推荐(0) 编辑
摘要: 一:newCachedThreadPool (1)缓存型池子,先查看池中有没有以前建立的线程,如果有,就reuse,如果没有,就建立一个新的线程加入池中; (2)缓存型池子,通常用于执行一些生存周期很短的异步型任务;因此一些面向连接的daemon型server中用得不多; (3)能reuse的线程, 阅读全文
posted @ 2016-07-02 19:02 薛晓东 阅读(1629) 评论(0) 推荐(0) 编辑
摘要: java.util.concurrent.Executors Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory, and Callable classe 阅读全文
posted @ 2016-07-02 17:57 薛晓东 阅读(302) 评论(0) 推荐(0) 编辑
摘要: void java.util.concurrent.Executor.execute(Runnable command) execute void execute(Runnable command) Executes the given command at some time in the fut 阅读全文
posted @ 2016-07-02 15:56 薛晓东 阅读(2478) 评论(0) 推荐(0) 编辑
摘要: java.util.concurrent.ExecutorService An Executor that provides methods to manage termination and methods that can produce a Future for tracking progre 阅读全文
posted @ 2016-07-02 15:42 薛晓东 阅读(185) 评论(0) 推荐(0) 编辑
摘要: io.netty.channel.group.ChannelGroup A thread-safe Set that contains open Channels and provides various bulk operations on them. Using ChannelGroup, yo 阅读全文
posted @ 2016-07-02 11:49 薛晓东 阅读(5299) 评论(0) 推荐(0) 编辑