java并发编程的艺术-ReentrantLock公平锁原理分析
lock方法分析
final void lock() {
acquire(1);
}
该lock方法会调用AbstractQueuedSynchronizer的acquire方法
/**
* Acquires in exclusive mode, ignoring interrupts. Implemented
* by invoking at least once {@link #tryAcquire},
* returning on succ
原创
2021-04-27 16:39:40 ·
99 阅读 ·
0 评论