Skip to content

Commit 86d48f2

Browse files
committed
重入锁
1 parent 14c50b9 commit 86d48f2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

MD/ReentrantLock.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22

33
使用 `synchronize` 来做同步处理时,锁的获取和释放都是隐式的,实现的原理是通过编译后加上不同的机器指令来实现的。
44

5-
而 ReentrantLock
5+
`ReentrantLock` 就是一个普通的类,它是基于 `AQS(AbstractQueuedSynchronizer)`来实现的。
6+
7+
> `AQS``Java` 并发包里实现锁、同步的一个基础框架。

0 commit comments

Comments
 (0)