【Java并发】线程池与队列

2018-04-03  本文已影响13人  Rockie_h

//TODO
线程池
<pre>public ThreadPoolExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
BlockingQueue<Runnable> workQueue,
RejectedExecutionHandler handler)</pre>

Executors.newFixedThreadPool(int nThreads)
Executors.newCachedThreadPool()
Executors.newSingleThreadScheduledExecutor()
Executors.newScheduledThreadPool(int corePoolSize)

队列
BlockingQueue<E>
ArrayBlockingQueue<E>
LinkedBlockingQueue<E>
...
广义上的内置条件队列:Condition

上一篇下一篇

猜你喜欢

热点阅读