threading/: - Rename 19 camelCase method files to hyphenated names - task-system: createtaskgroup→create-task-group, etc. - tasksystemconfig: enabletaskprofiling→enable-task-profiling, etc. - thread: getcurrentid→get-current-id, etc. - task: addref→add-ref, getid→get-id, etc. math/: - Rename underscore operator files to hyphenated - vector3: operator_add→operator-add, etc. - matrix4: gettranslation→get-translation, etc. - vector4: tovector3→to-vector3, constructor_vector3→constructor-vector3 - sphere: sphere_constructor→sphere-constructor, etc. memory/: - Remove duplicate memorymanager/ folder (kept manager/ which was correct) core/: - filewriter: Consolidate ctor-default.md and ctor-file.md into constructor.md - Rename dtor.md→destructor.md debug/: - filelogsink: Rename construct.md→constructor.md, ~filelogsink.md→destructor.md All overview pages updated with new file references.
26 lines
556 B
Markdown
26 lines
556 B
Markdown
# TaskSystemConfig::workerThreadCount
|
|
|
|
```cpp
|
|
uint32_t workerThreadCount = 0
|
|
```
|
|
|
|
工作线程数量。当值为 0 时,任务系统自动检测 `std::thread::hardware_concurrency()` 并使用该值。
|
|
|
|
**类型:** `uint32_t`
|
|
|
|
**默认值:** `0`(自动检测)
|
|
|
|
**示例:**
|
|
|
|
```cpp
|
|
TaskSystemConfig config;
|
|
config.workerThreadCount = 4; // 使用 4 个工作线程
|
|
|
|
TaskSystemConfig autoConfig;
|
|
autoConfig.workerThreadCount = 0; // 自动检测(推荐)
|
|
```
|
|
|
|
## 相关文档
|
|
|
|
- [TaskSystemConfig 总览](tasksystemconfig.md) - 返回类总览
|