![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
源码解析
文章平均质量分 84
cff302959274
这个作者很懒,什么都没留下…
展开
-
JDK1.8中的HashMap实现过程
一、HashMap基本元素 /** * The default initial capacity - MUST be a power of two. */ static final int DEFAULT_INITIAL_CAPACITY = 1 << 4; // aka 16 /** * The maximum capacity,...原创 2018-03-15 16:50:09 · 762 阅读 · 1 评论 -
ConcurrentHashMap源码解析
一、ConcurrentHashMap基本元素 /** * The largest possible table capacity. This value must be * exactly 1<<30 to stay within Java array allocation and indexing * bounds for power of t...原创 2018-03-16 17:52:16 · 171 阅读 · 0 评论 -
线程池详解
一、作用 限制系统中执行任务的线程数量 二、种类 1. newSingleThreadExecutor 创建一个单线程的线程池。这个线程池只有一个线程在工作,也就是相当于单线程串行执行所有任务。如果这个唯一的线程因为异常结束,那么会有一个新的线程来替代它。此线程池保证所有任务的执行顺序按照任务的提交顺序执行。 2.newFixedThreadPool 创建固定大小的线程池。每次提交一个...原创 2018-05-18 18:08:31 · 168 阅读 · 0 评论