随笔分类 -  源码

摘要:Semaphore https://www.bilibili.com/video/BV1Ae411C7xr/ public class Semaphore implements java.io.Serializable 同Reetrantlock在Sync 继承AQS abstract static 阅读全文
posted @ 2024-03-19 10:56 8023渡劫 阅读(9) 评论(0) 推荐(0) 编辑
摘要:public class ThreadPoolExecutor extends AbstractExecutorService private final AtomicInteger ctl = new AtomicInteger(ctlOf(RUNNING, 0)); ctl int32位 高3位 阅读全文
posted @ 2024-03-18 17:03 8023渡劫 阅读(6) 评论(0) 推荐(0) 编辑
摘要:ThreadLocal set public void set(T value) { Thread t = Thread.currentThread(); ThreadLocalMap map = getMap(t); if (map != null) //map不为null,之前设置过情况 map 阅读全文
posted @ 2024-03-15 17:13 8023渡劫 阅读(10) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示