mirror of
https://github.com/ml-explore/mlx.git
synced 2025-11-02 09:18:11 +08:00
only interrupt during an eval
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user