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:
36
docs/api/threading/task-system/update.md
Normal file
36
docs/api/threading/task-system/update.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# TaskSystem::Update
|
||||
|
||||
```cpp
|
||||
void Update()
|
||||
```
|
||||
|
||||
在主线程中处理主线程队列。执行所有通过 RunOnMainThread 提交的任务。
|
||||
|
||||
**参数:** 无
|
||||
|
||||
**返回:** 无
|
||||
|
||||
**复杂度:** O(n),n 为队列中待执行任务数
|
||||
|
||||
**使用场景:**
|
||||
- 在主循环中调用,确保 RunOnMainThread 提交的任务能够执行。
|
||||
- 应在渲染前调用。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
// 主循环
|
||||
while (application.IsRunning()) {
|
||||
TaskSystem::Get().Update(); // 处理主线程任务
|
||||
|
||||
// 渲染
|
||||
Renderer.BeginFrame();
|
||||
RenderScene();
|
||||
Renderer.EndFrame();
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [TaskSystem 总览](task-system.md) - 返回类总览
|
||||
- [RunOnMainThread](runonmainthread.md) - 提交主线程任务
|
||||
Reference in New Issue
Block a user