问二十四:分类说明JUC包常用类有哪些?

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_18657175/article/details/89784664

JUC中常用类汇总

JUC的atomic包下运用了CAS的AtomicBoolean、AtomicInteger、AtomicReference等原子变量类

JUC的locks包下的AbstractQueuedSynchronizer(AQS)以及使用AQS的ReentantLock(显式锁)、ReentrantReadWriteLock

附:运用了AQS的类还有:Semaphore、CountDownLatch、ReentantLock(显式锁)、ReentrantReadWriteLock

JUC下的一些同步工具类:CountDownLatch(闭锁)、Semaphore(信号量)、CyclicBarrier(栅栏)、FutureTask

JUC下的一些并发容器类:ConcurrentHashMap、CopyOnWriteArrayList

JUC下的一些Executor框架的相关类: 线程池的工厂类->Executors  线程池的实现类->ThreadPoolExecutor/ForkJoinPool

JUC下的一些阻塞队列实现类:ArrayBlockingQueue、LinkedBlockingQueue、PriorityBlockingQueue

附:ForkJoinPool:使用work-stealing的工作方式运行

猜你喜欢

转载自blog.csdn.net/qq_18657175/article/details/89784664