Files
XCSDD/docs/api/threading/task-system/update.md
ssdfasd 58a83f445a 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
2026-03-19 12:44:08 +08:00

727 B
Raw Blame History

TaskSystem::Update

void Update()

在主线程中处理主线程队列。执行所有通过 RunOnMainThread 提交的任务。

参数:

返回:

复杂度: O(n)n 为队列中待执行任务数

使用场景:

  • 在主循环中调用,确保 RunOnMainThread 提交的任务能够执行。
  • 应在渲染前调用。

示例:

// 主循环
while (application.IsRunning()) {
    TaskSystem::Get().Update();  // 处理主线程任务
    
    // 渲染
    Renderer.BeginFrame();
    RenderScene();
    Renderer.EndFrame();
}

相关文档