mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Close wrapped value after each iteration in MapSegmentIteration
This commit is contained in:
@@ -137,6 +137,7 @@ public abstract class HashSegmentIteration<K, E extends HashEntry<K>>
|
||||
break;
|
||||
}
|
||||
} finally {
|
||||
hookAfterEachIteration();
|
||||
// if doReplaceValue() -> relocation() -> alloc() -> nextTier()
|
||||
// was called, restore the tier we were iterating over
|
||||
if (s.tier != currentTier) {
|
||||
@@ -170,6 +171,9 @@ public abstract class HashSegmentIteration<K, E extends HashEntry<K>>
|
||||
return interrupted;
|
||||
}
|
||||
|
||||
public void hookAfterEachIteration() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void forEachSegmentEntry(Consumer<? super E> action) {
|
||||
forEachSegmentEntryWhile(e -> {
|
||||
|
||||
Reference in New Issue
Block a user