1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-16 18:10:13 +08:00

Update JavaConcurrencyBasicsCommonInterviewQuestionsSummary.md

This commit is contained in:
SnailClimb 2019-05-04 13:07:53 +08:00 committed by GitHub
parent 18d80e0481
commit e84f4d1d15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
下面通过一个例子来说明线程死锁,代码模拟了上图的死锁的情况 (代码来源于《并发编程之美》)