mirror of
https://github.com/usatiuk/dhfs.git
synced 2025-10-29 04:57:48 +01:00
Utils: die on lock timeout
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user