Skip to content

Commit

Permalink
Update JavaConcurrencyBasicsCommonInterviewQuestionsSummary.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Snailclimb authored May 4, 2019
1 parent 18d80e0 commit e84f4d1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Linux 相比与其他操作系统(包括其他类 Unix 系统)有很多的

如下图所示,线程 A 持有资源 2,线程 B 持有资源 1,他们同时都想申请对方的资源,所以这两个线程就会互相等待而进入死锁状态。

![线程死锁示意图 ](https://my-blog-to-use.oss-cn-beijing.aliyuncs.com/2019-4/2019-4 死锁 1.png)
![线程死锁示意图 ](https://my-blog-to-use.oss-cn-beijing.aliyuncs.com/2019-4/2019-4%E6%AD%BB%E9%94%811.png)

下面通过一个例子来说明线程死锁,代码模拟了上图的死锁的情况 (代码来源于《并发编程之美》):

Expand Down

0 comments on commit e84f4d1

Please sign in to comment.