docs: Document stub/not-implemented methods in resources module

Fixed discrepancies between source code and documentation:
- AsyncLoader: Document Initialize() ignores workerThreadCount, Submit() doesn't do actual async loading, Update() is stub
- ResourceManager: Document UnloadUnused() and ReloadResource() are stubs
- ResourceCache: Document OnZeroRefCount() and Flush() are stubs
- ResourceDependencyGraph: Document TopologicalSort() returns empty (stub)
- ResourceFileSystem: Document GetResourceInfo() doesn't fill modifiedTime, EnumerateResources() is stub
- FileArchive: Document Enumerate() is stub
- ResourcePackageBuilder: Document AddDirectory() is stub
- ImportSettings: Document LoadFromJSON/SaveToJSON are stubs
- TextureImportSettings/MeshImportSettings: Document JSON methods are stubs
- TextureLoader/MeshLoader/MaterialLoader/ShaderLoader/AudioLoader: Document GetDefaultSettings() returns nullptr
- AudioLoader: Document ParseWAVData() is stub, Load() doesn't parse WAV headers
- ShaderLoader: Document DetectShaderType/ParseShaderSource are stubs
- MaterialLoader: Document ParseMaterialData() is stub
- Texture: Document Create() mipLevels=0 behavior, GenerateMipmaps() returns false
- Mesh: Document MeshLoader::Load() is example only
- IResourceLoader: Document GetDefaultSettings() returns nullptr for all loaders
This commit is contained in:
2026-03-19 01:16:12 +08:00
parent 8c719418d0
commit 7e4c48d4f9
21 changed files with 192 additions and 37 deletions

View File

@@ -4,18 +4,19 @@
void Wait()
```
**注意:** 此方法当前为**空实现/桩代码**,不执行任何操作。
阻塞当前线程,等待任务组中所有任务完成。
**参数:**
**返回:**
**复杂度:** O(n)n 为任务数量
**复杂度:** N/A空实现
**注意**
- 如果任务组已被取消,此方法将立即返回。
- **警告**:由于实现缺陷,`m_pendingCount` 计数器在任务完成后不会递减,导致 `Wait()` 在所有任务执行完毕后仍会永久阻塞。这是当前实现的已知问题
- 建议使用 `WaitFor()` 代替以避免永久阻塞。
**当前状态** 此方法为空实现,不执行任何操作。由于 `m_pendingCount` 计数器未正确更新,此方法永远无法正常运作。
**建议:** 使用 `WaitFor()` 代替以避免永久阻塞
**示例:**
@@ -29,8 +30,12 @@ for (int i = 0; i < 10; ++i) {
}
printf("Waiting for all tasks...\n");
group->Wait();
printf("All tasks completed!\n");
// 注意Wait() 为空实现,建议使用 WaitFor()
if (group->WaitFor(std::chrono::seconds(5))) {
printf("All tasks completed within 5 seconds\n");
} else {
printf("Timeout! Tasks may not have completed\n");
}
TaskSystem::Get().DestroyTaskGroup(group);
```