refactor: 加载系统重构

This commit is contained in:
AncTe committed 2026-09-20 20:53:46 +08:00
1 parent d12790280a
commit cc434a6c66
27 files changed
+409 -266

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
export * from './progress';
export * from './manager';
export * from './starter';
export * from './stream';
export * from './task';
@@ -49,6 +49,11 @@ export class LoadManager
}
async *load(): AsyncIterable<number> {
for (const task of this.addedTasks) {
if (!task.contentLoaded) {
task.start();
}
}
while (true) {
if (this.loadedTasks.size === this.addedTasks.size) {
return;