- 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
39 lines
840 B
Markdown
39 lines
840 B
Markdown
# TaskGroup::IsComplete
|
|
|
|
```cpp
|
|
bool IsComplete() const
|
|
```
|
|
|
|
**注意:** 此方法当前为**空实现/桩代码**。
|
|
|
|
检查任务组中所有任务是否已完成。
|
|
|
|
**参数:** 无
|
|
|
|
**返回:** `bool` - 始终返回 `false`(空实现)
|
|
|
|
**复杂度:** O(1)(空实现)
|
|
|
|
**当前状态:** 此方法为空实现,始终返回 `false`,因为 `m_pendingCount` 计数器未正确递减。
|
|
|
|
**示例:**
|
|
|
|
```cpp
|
|
TaskGroup* group = TaskSystem::Get().CreateTaskGroup();
|
|
|
|
for (int i = 0; i < 100; ++i) {
|
|
group->AddTask([i]() { HeavyCompute(i); });
|
|
}
|
|
|
|
// 非阻塞轮询
|
|
while (!group->IsComplete()) {
|
|
printf("Progress: %.1f%%\n", group->GetProgress() * 100.0f);
|
|
Thread::Sleep(500);
|
|
}
|
|
```
|
|
|
|
## 相关文档
|
|
|
|
- [TaskGroup 总览](task-group.md) - 返回类总览
|
|
- [GetProgress](getprogress.md) - 获取完成进度
|