only interrupt during an eval

This commit is contained in:
Awni Hannun
2025-03-19 07:56:26 -07:00
parent 9ffe88841c
commit 688e421184
3 changed files with 48 additions and 11 deletions

View File

@@ -97,7 +97,8 @@ TEST_CASE("test interrupt eval") {
x = x + 1;
}
std::thread t([x]() { eval(x); });
interrupt_eval();
while (!interrupt_eval()) {
}
t.join();
// Check that x is not evaluated
CHECK(!x.is_available());