11 2019 档案
摘要:在日常开发中,我们都直接或间接的使用过ReentrantLock,以及他的兄弟们Semaphore,CountdownLatch,ReadwriteLock,但是对于其底层是如果实现锁机制的呢? 下面我们先来看一张图: 大家可能在想,这张图里面并没有看到我们知道ReentrantLock,甚至连Lo
阅读全文
摘要:我们可以先由源码注释来了解intern(); When the intern method is invoked, if the pool already contains astring equal to this {@code String} object as determined bythe
阅读全文