fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling - Improve link styling with underline decoration - Hide leaf nodes from tree, only show directories - Fix log file path for packaged app
This commit is contained in:
35
docs/api/threading/task/setstatus.md
Normal file
35
docs/api/threading/task/setstatus.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# ITask::SetStatus
|
||||
|
||||
```cpp
|
||||
void SetStatus(TaskStatus status)
|
||||
```
|
||||
|
||||
设置任务的当前状态。
|
||||
|
||||
**参数:**
|
||||
- `status` - 新的状态(参见 TaskStatus 枚举)
|
||||
|
||||
**返回:** 无
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**注意:** 正常情况下由 TaskSystem 管理状态。手动设置状态可能干扰任务系统的正常调度。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
class ConditionalTask : public ITask {
|
||||
public:
|
||||
void Execute() override {
|
||||
if (someCondition) {
|
||||
SetStatus(TaskStatus::Failed);
|
||||
return;
|
||||
}
|
||||
// 正常处理
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [ITask 总览](task.md) - 返回类总览
|
||||
Reference in New Issue
Block a user