Files
Hui-s-notebook/logseq-java/pages/死锁.md
2024-02-02 00:12:49 +08:00

13 lines
371 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
- 多线程之间互相持有对方需要对象的锁,而且无限期等待对方释放
- 条件
- 使用互斥锁
- 其它线程无法剥夺当前线程持有的锁
- 相互无限期等待
- 相互保持死锁状态
- 检测死锁
- jconsole.exe
- jvisualvm.exe
- 解决
- 业务逻辑的问题
- 找一些具有时效的锁Redis的锁
- 统一加锁顺序