JUC线程池

原创转载请注明出处:https://www.cnblogs.com/agilestyle/p/11443644.html

newFixedThreadPool

ExecutorService newFixedThreadPool(int nThreads)


ExecutorService newFixedThreadPool(int nThreads, ThreadFactory threadFactory)

newCachedThreadPool

ExecutorService newCachedThreadPool()

ExecutorService newCachedThreadPool(ThreadFactory threadFactory)

newSingleThreadExecutor 

ExecutorService newSingleThreadExecutor()

ExecutorService newSingleThreadExecutor(ThreadFactory threadFactory)

ScheduledThreadPoolExecutor

ScheduledExecutorService newScheduledThreadPool(int corePoolSize)


ScheduledExecutorService newScheduledThreadPool(int corePoolSize, ThreadFactory threadFactory)


ScheduledExecutorService newSingleThreadScheduledExecutor()


ScheduledExecutorService newSingleThreadScheduledExecutor(ThreadFactory threadFactory)

newWorkStealingPool

ExecutorService newWorkStealingPool(int parallelism)


ExecutorService newWorkStealingPool()

猜你喜欢

转载自www.cnblogs.com/agilestyle/p/11443644.html