mirror of
https://github.com/youthlql/JavaYouth.git
synced 2026-03-13 21:33:42 +08:00
更新所有文章的图床,旧图床由于一些原因可能会逐渐失效
This commit is contained in:
@@ -9,7 +9,7 @@ categories:
|
||||
- 原理
|
||||
keywords: Java并发,原理,源码
|
||||
description: 万字系列长文讲解-Java并发体系-第三阶段-JUC并发包。JUC在高并发编程中使用频率非常高,这里会详细介绍其用法。
|
||||
cover: 'https://unpkg.zhimg.com/youthlql@1.0.8/Java_concurrency/logo_1.png'
|
||||
cover: 'https://gitee.com/youthlql/randombg/raw/master/logo/Java_concurrency.png'
|
||||
abbrlink: 70c90e5d
|
||||
date: 2020-10-10 22:13:58
|
||||
---
|
||||
@@ -563,7 +563,7 @@ public int getUnarrivedParties()
|
||||
|
||||
根据上面的代码,我们可以画出下面这个很简单的图:
|
||||
|
||||
<img src="https://unpkg.zhimg.com/youthlql@1.0.8/Java_concurrency/Source_code/Third_stage/0002.png">
|
||||
<img src="https://img.imlql.cn/youthlql@1.0.8/Java_concurrency/Source_code/Third_stage/0002.png">
|
||||
|
||||
这棵树上有 7 个 phaser 实例,每个 phaser 实例在构造的时候,都指定了 parties 为 5,但是,对于每个拥有子节点的节点来说,每个子节点都是它的一个 party,我们可以通过 phaser.getRegisteredParties() 得到每个节点的 parties 数量:
|
||||
|
||||
@@ -952,7 +952,7 @@ public class ThreadPoolDemo {
|
||||
|
||||
## 线程池的底层工作流程
|
||||
|
||||
<img src="https://unpkg.zhimg.com/youthlql@1.0.8/Java_concurrency/Source_code/Third_stage/0003.png">
|
||||
<img src="https://img.imlql.cn/youthlql@1.0.8/Java_concurrency/Source_code/Third_stage/0003.png">
|
||||
|
||||
1、创建线程池后,等待请求任务
|
||||
|
||||
@@ -1646,7 +1646,7 @@ public class ExecutorCompletionService<V> implements CompletionService<V> {
|
||||
|
||||
**执行流程:**
|
||||
|
||||
<img src="https://unpkg.zhimg.com/youthlql@1.0.8/Java_concurrency/Source_code/Third_stage/0004.png">
|
||||
<img src="https://img.imlql.cn/youthlql@1.0.8/Java_concurrency/Source_code/Third_stage/0004.png">
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user