From 41a4be678e288fe1047e6946a58f1d871c1de77a Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Mon, 1 Jun 2026 15:48:10 -0500 Subject: [PATCH] Added a tiny sleep on assets to stop pegging the CPU --- src/dusk/asset/asset.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dusk/asset/asset.c b/src/dusk/asset/asset.c index 161a449e..b3f747cb 100644 --- a/src/dusk/asset/asset.c +++ b/src/dusk/asset/asset.c @@ -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); } }