Skip to content

Commit

Permalink
ÈvalEngine don't check Thread.interrupted()` for timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
axkr committed Sep 18, 2024
1 parent bfd8370 commit c1cd091
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,17 @@ public void setDeterminePrecision(IExpr expr) {
//
}
}
// public void setDeterminePrecision(IExpr expr, boolean postParserProcessing) {
// try {
// // determine the precision of the input before evaluation
// long precision = expr.determinePrecision(postParserProcessing);
// if (precision > getNumericPrecision()) {
// setNumericPrecision(precision);
// }
// } catch (RecursionLimitExceeded rle) {
// //
// }
// }

private IAST endTrace() {
setTraceMode(false);
Expand Down Expand Up @@ -1957,10 +1968,6 @@ private final IExpr evalLoop(final IExpr expr) {
if ((fRecursionLimit > 0) && (fRecursionCounter > fRecursionLimit)) {
RecursionLimitExceeded.throwIt(fRecursionLimit, expr);
}
if (Thread.interrupted()) {
// check before going one recursion deeper
throw TimeoutException.TIMED_OUT;
}

long iterationCounter = 0;
if (fTraceMode) {
Expand Down Expand Up @@ -2042,10 +2049,6 @@ private IExpr evalLoopTraceMode(final IExpr expr) {
try {
IExpr temp = result.evaluate(this);
if (temp.isPresent()) {
if (Thread.interrupted()) {
throw TimeoutException.TIMED_OUT;
}

fTraceStack.add(expr, temp, fRecursionCounter, 0L, EVALUATION_LOOP);
result = temp;
long iterationCounter = 1;
Expand Down

0 comments on commit c1cd091

Please sign in to comment.