提供了工厂方法:
Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory, and Callable classes defined in this package. This class supports the following kinds of methods:
ExecutorService set up with commonly useful configuration settings.ScheduledExecutorService set up with commonly useful configuration settings.ThreadFactory that sets newly created threads to a known state.Callable out of other closure-like forms, so they can be used in execution methods requiring Callable。1、ExecutorService (为ThreadPoolExecutor设置了一些通用的参数来生成一些线程池,使用的BlockingQueue都是inbound的queue)
1、ScheduledThreadPool
2、singledThreadPool
3、cachedThreadPool(默认是线程处于idle 6s就自动回收,适合大量而且小的异步任务)
4、FixedThreadPool
原文:http://www.cnblogs.com/YDDMAX/p/5208533.html