Fix locking for the entire RunIdle callback execution

This commit is contained in:
tznind
2022-10-13 09:52:12 +01:00
committed by BDisp
parent e809affb10
commit 8e54135b53

View File

@@ -306,9 +306,12 @@ namespace Terminal.Gui {
Driver.MainIteration ();
bool runIdle = false;
lock (idleHandlersLock) {
if (idleHandlers.Count > 0)
RunIdle ();
runIdle = idleHandlers.Count > 0;
}
if (runIdle) {
RunIdle ();
}
}