Skip to content

Commit

Permalink
修改第一章 mermaid 示意图;增加一点第四章内容
Browse files Browse the repository at this point in the history
  • Loading branch information
Mq-b committed Jul 21, 2024
1 parent 9e82309 commit 68e852f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 0 additions & 6 deletions md/01基本概念.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ graph TD;
CPU2 --> Task2[任务2]
CPU3 --> Task3[任务3]
end
style MultiCore, CPU1, CPU2, CPU3, Task1, Task2, Task3 fill:#fff,stroke:#333,stroke-width:2px;
```

```mermaid
Expand All @@ -55,9 +52,6 @@ graph TD;
TaskSwitching --> Task2[任务2执行片段]
TaskSwitching --> Task3[任务3执行片段]
end
style SingleCore, OS, TaskSwitching, Task1, Task2, Task3 fill:#fff,stroke:#333,stroke-width:2px;
```

## 并发与并行
Expand Down
7 changes: 6 additions & 1 deletion md/详细分析/04线程池.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ graph TD

了解以上这些基础概念是第一步也是最后一步,随着水平的提升,对这些概念认知与理解也会逐渐提升。

## 市面上常规的线程池

在了解了线程池的基本概念与运行逻辑后,我们不用着急就尝试实现。我们可以先来聊一聊,使用一下市面上常见的那些线程池设施,了解它们的使用感受,接口设计的方式。

**`boost::asio::thread_pool`****`QThreadPool`**`PPL`

## 实现线程池

实现一个普通的能够满足日常开发需求的线程池实际上非常简单,也只需要一百多行代码。

0 comments on commit 68e852f

Please sign in to comment.