Added a tiny sleep on assets to stop pegging the CPU

This commit is contained in:
2026-06-01 15:48:10 -05:00
parent 8b2b4b7c3d
commit 41a4be678e
+4
View File
@@ -89,6 +89,7 @@ errorret_t assetRequireLoaded(assetentry_t *entry) {
// Not loaded, just spin the wheel
while(entry->state != ASSET_ENTRY_STATE_LOADED) {
usleep(1000);
errorChain(assetUpdate());
}
@@ -268,6 +269,9 @@ void assetUpdateAsync(thread_t *thread) {
continue;
}
} while(loading < ASSET.loading + ASSET_LOADING_COUNT_MAX);
if(threadShouldStop(thread)) break;
usleep(1000);
}
}