mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-06-16 18:10:13 +08:00
Update JavaConcurrencyBasicsCommonInterviewQuestionsSummary.md
This commit is contained in:
parent
18d80e0481
commit
e84f4d1d15
@ -168,7 +168,7 @@ Linux 相比与其他操作系统(包括其他类 Unix 系统)有很多的
|
||||
|
||||
如下图所示,线程 A 持有资源 2,线程 B 持有资源 1,他们同时都想申请对方的资源,所以这两个线程就会互相等待而进入死锁状态。
|
||||
|
||||

|
||||

|
||||
|
||||
下面通过一个例子来说明线程死锁,代码模拟了上图的死锁的情况 (代码来源于《并发编程之美》):
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user