摘要: ReentrantLock 1 数据结构 从上图可以看出,ReentrantLock的功能都是通过sync这个对象提供的。 2 获取锁是否要走公平非公平逻辑 区分公平非公平锁,公平锁老实排队 lock lockInterruptibly tryLock(long timeout, TimeUnit 阅读全文
posted @ 2020-04-21 14:25 zerodseu 阅读(122) 评论(0) 推荐(0) 编辑