Improvements to ChronicleMap resource closing subsystem, making it more robust in exotic scenarios (OutOfMemoryError, StackOverflowError) and be able to close after incorrect attempt to close when a context is open in the same thread

This commit is contained in:
leventov
2016-12-26 14:27:32 +08:00
parent 4bb2decc34
commit fa70e216bd
10 changed files with 314 additions and 145 deletions
@@ -61,7 +61,11 @@ public class ExitHookTest {
ChronicleMap<Integer, Integer> map = createMap(mapFile);
try (ExternalMapQueryContext<Integer, Integer, ?> c = map.queryContext(KEY)) {
c.writeLock().lock();
Thread.sleep(30_000);
try {
map.close();
} finally {
Thread.sleep(30_000);
}
}
}