mirror of
https://github.com/AdvDebug/Brovan
synced 2026-08-09 11:57:17 +00:00
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:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user