Utils: die on lock timeout

This commit is contained in:
2025-03-23 14:27:36 +01:00
parent 9a02a554a1
commit a63e7e59b3

View File

@@ -23,7 +23,12 @@ public class DataLocker {
if (tag.owner == Thread.currentThread()) {
return DUMMY_LOCK;
}
tag.wait();
tag.wait(4000L);
if (!tag.released) {
System.out.println("Timeout waiting for lock: " + data);
System.exit(1);
throw new InterruptedException();
}
}
continue;
}