Skip to content

Commit f347d7c

Browse files
committed
Synchronize
1 parent 08b963c commit f347d7c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

MD/Synchronize.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Synchronize 关键字原理
2+
3+
众所周知 Synchronize 关键字是解决并发问题常用解决方案,有以下三种使用方式:
4+
5+
- 同步普通方法,锁的是当前对象。
6+
- 同步静态方法,锁的是当前 `Class` 对象。
7+
- 同步块,锁的是 `{}` 中的对象。

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
### Java 多线程
88
- [多线程中的常见问题](https://github.com/crossoverJie/Java-Interview/blob/master/MD/Thread-common-problem.md)
9+
- `Synchronize` 关键字原理
910
- [多线程的三大核心](https://github.com/crossoverJie/Java-Interview/blob/master/MD/Threadcore.md)
1011
- [对锁的一些认知,有哪些锁](https://github.com/crossoverJie/Java-Interview/blob/master/MD/Java-lock.md)
1112

0 commit comments

Comments
 (0)