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
@@ -335,9 +335,9 @@ public class VanillaChronicleMap<K, V, R>
cxt.set(contextHolder);
return iterationContext;
}
ChainingInterface iterContext = contextHolder.get();
if (iterContext != null) {
return iterContext;
ChainingInterface iterationContext = contextHolder.get();
if (iterationContext != null) {
return iterationContext;
} else {
throw new ChronicleHashClosedException(this);
}