More explicit handling of CPU exhaustion #2093

This commit is contained in:
rusefillc 2020-12-17 21:15:28 -05:00
parent fab0c1c59b
commit 99392d7951
1 changed files with 5 additions and 0 deletions

View File

@ -123,10 +123,15 @@ void SingleTimerExecutor::executeAllPendingActions() {
* TODO: add a counter & figure out a limit of iterations?
*/
int executeCounter = 0;
bool didExecute;
do {
efitick_t nowNt = getTimeNowNt();
didExecute = queue.executeOne(nowNt);
if (executeCounter++ == 10000) {
firmwareError(CUSTOM_ERR_LOCK_ISSUE, "Looks like firmware is really busy");
}
} while (didExecute);
if (!isLocked()) {