More explicit handling of CPU exhaustion #2093
This commit is contained in:
parent
ed32b9b656
commit
8a2c14c1de
|
@ -123,10 +123,15 @@ void SingleTimerExecutor::executeAllPendingActions() {
|
||||||
* TODO: add a counter & figure out a limit of iterations?
|
* TODO: add a counter & figure out a limit of iterations?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
int executeCounter = 0;
|
||||||
bool didExecute;
|
bool didExecute;
|
||||||
do {
|
do {
|
||||||
efitick_t nowNt = getTimeNowNt();
|
efitick_t nowNt = getTimeNowNt();
|
||||||
didExecute = queue.executeOne(nowNt);
|
didExecute = queue.executeOne(nowNt);
|
||||||
|
if (executeCounter++ == 10000) {
|
||||||
|
firmwareError(CUSTOM_ERR_LOCK_ISSUE, "Looks like firmware is really busy");
|
||||||
|
}
|
||||||
|
|
||||||
} while (didExecute);
|
} while (didExecute);
|
||||||
|
|
||||||
if (!isLocked()) {
|
if (!isLocked()) {
|
||||||
|
|
Loading…
Reference in New Issue