Java并发之(7):自定义Latch



java thread pool ???

 

there are 11 different types of threads in nts, so it has a threadPool class, which has  a singleton instance.

 

threadPool在jdk中对应的就是ThreadPoolExecutor

Excutors类有下面两个静态方法:

static ExecutorService newCachedThreadPool()
Creates a thread pool that creates new threads as needed, but will reuse previously constructed threads when they are available.
static ExecutorService newCachedThreadPool(ThreadFactory threadFactory)
Creates a thread pool that creates new threads as needed, but will reuse previously constructed threads when they are available, and uses the provided ThreadFactory to create new threads when needed.

 分别返回ExecutorService接口的实现类实例d using ThreadPoolExecutor constructors.。

threadPoolExecutor是一个类,实现了ExecutorService接口。

 

.submit eat exception 

 

http://blog.csdn.net/geolo/article/details/8670900

posted @ 2015-12-07 09:27  Zhao_Gang  阅读(154)  评论(0)    收藏  举报