摘要: 手写MiniBlockingQueue阻塞队列 BlockingQueue接口 package com.xiaozhou; public interface BlockingQueue<T> { void put(T element) throws InterruptedException; T t 阅读全文
posted @ 2021-07-30 23:42 s686编程传 阅读(126) 评论(0) 推荐(0) 编辑
摘要: AQS独占模式(基于ReentrantLock公平锁) — 源码解析 一、 基本概念 AQS全称 AbstractQueuedSynchronizer, 是JUC包下的一个抽象类。可以说它是整个JUC并发的基础框架。非常重要。在ReentrantLock, ReentrantReadWriteLoc 阅读全文
posted @ 2021-07-30 06:07 s686编程传 阅读(111) 评论(0) 推荐(0) 编辑