28 lines
483 B
Markdown
28 lines
483 B
Markdown
# TaskSystem::GetWorkerThreadCount
|
|
|
|
```cpp
|
|
uint32_t GetWorkerThreadCount() const
|
|
```
|
|
|
|
获取工作线程的数量。
|
|
|
|
**参数:** 无
|
|
|
|
**返回:** `uint32_t` - 工作线程数量
|
|
|
|
**线程安全:** ✅ (只读操作)
|
|
|
|
**复杂度:** O(1)
|
|
|
|
**示例:**
|
|
|
|
```cpp
|
|
TaskSystem::Get().Initialize(config);
|
|
uint32_t count = TaskSystem::Get().GetWorkerThreadCount();
|
|
printf("Worker threads: %u\n", count);
|
|
```
|
|
|
|
## 相关文档
|
|
|
|
- [TaskSystem 总览](task-system.md) - 返回类总览
|