Fix scheduler redundant loop

Fix scheduler redundant loop when the main (or other) thread dies, causing the emulator to loop unnecessarily.
This commit is contained in:
AdvDebug
2026-06-24 17:36:16 +03:00
parent eb321fb97b
commit 425db64104
+2 -2
View File
@@ -2266,7 +2266,7 @@ namespace Brovan.Core.Emulation
return true;
}
if (TryGetNextWaitSleepMs(out int SleepMs))
if (TryGetNextWaitSleepMs(out int SleepMs, int.MaxValue))
{
if (Debug)
TriggerDebugMessage($"scheduler: no runnable thread, advancing guest time by {SleepMs}ms");
@@ -3280,4 +3280,4 @@ namespace Brovan.Core.Emulation
//~BinaryEmulator() => Dispose();
}
}
}