-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3c68107
commit 5c8dac2
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# 项目重构 | ||
|
||
## 资源 | ||
|
||
注意对其修改时不要落下任何用到该资源的任务。 | ||
|
||
> [!NOTE] | ||
> | ||
> 善用全局搜索 | ||
## 任务 | ||
|
||
### sub 任务 | ||
|
||
这里将 `is_sub` (已废弃) 值为 `true` 的任务称为 `sub 任务` 。 | ||
|
||
重构 `sub 任务` ,有以下几个步骤: | ||
|
||
1. 判断该 `sub 任务` 在当前任务 `next` 列表中是否处于最低优先级(即直接放到当前任务 `interrupt` 列表中对实际效果有无影响) | ||
2. 若该 `sub 任务` 不处于最低优先级,重构方法是将当前任务的 `next` 和 `interrupt` 加入 `sub 任务` (原 `next` 和 `interrupt` 为空可直接进行,不为空则需考虑是否冲突);若该 `sub 任务` 处于最低优先级,重构方法为直接放到当前任务的 `interrupt` 中 | ||
3. 若该 `sub 任务` 不处于最低优先级,且步骤2的改动会引起冲突,则需要重新考虑任务逻辑。 | ||
4. 将 `sub 任务` 的 `is_sub` 属性删除 | ||
|
||
> [!WARNING] | ||
> | ||
> 以上全部改动均需考虑所有使用该 `sub 任务` 的任务,不要落下! | ||
### 其它任务 | ||
|
||
#### 简化任务链 | ||
|
||
目的:简化 pipeline、理清逻辑 |