refactor: reorganize docs into plan/ and add skills/
This commit is contained in:
33
docs/api/threading/threading-tasksystemconfig.md
Normal file
33
docs/api/threading/threading-tasksystemconfig.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# TaskSystemConfig
|
||||
|
||||
**命名空间**: `XCEngine::Threading`
|
||||
|
||||
**类型**: `struct`
|
||||
|
||||
**描述**: 任务系统配置结构体。
|
||||
|
||||
## 结构体成员
|
||||
|
||||
| 成员 | 类型 | 描述 | 默认值 |
|
||||
|------|------|------|--------|
|
||||
| `workerThreadCount` | `uint32_t` | 工作线程数量(0=自动检测) | 0 |
|
||||
| `enableTaskProfiling` | `bool` | 启用任务性能分析 | true |
|
||||
| `stealTasks` | `bool` | 启用工作窃取 | true |
|
||||
| `maxTaskQueueSize` | `uint32_t` | 最大任务队列大小 | 1024 |
|
||||
| `threadStackSize` | `uint32_t` | 线程栈大小(0=默认) | 0 |
|
||||
|
||||
## 使用示例
|
||||
|
||||
```cpp
|
||||
TaskSystemConfig config;
|
||||
config.workerThreadCount = std::thread::hardware_concurrency();
|
||||
config.enableTaskProfiling = true;
|
||||
config.stealTasks = true;
|
||||
config.maxTaskQueueSize = 2048;
|
||||
|
||||
TaskSystem::Get().Initialize(config);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [TaskSystem](./threading-task-system.md) - 任务系统
|
||||
Reference in New Issue
Block a user