mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Fixed a couple of bugs in AbstractChronicleMap iterations
This commit is contained in:
@@ -295,6 +295,7 @@ abstract class AbstractChronicleMap<K, V> extends AbstractMap<K, V>
|
||||
c.updateLock().lock();
|
||||
c.initSegment();
|
||||
c.hashLookup.forEach(this);
|
||||
return;
|
||||
} finally {
|
||||
context = null;
|
||||
}
|
||||
@@ -466,7 +467,8 @@ abstract class AbstractChronicleMap<K, V> extends AbstractMap<K, V>
|
||||
try {
|
||||
if (!c.containsKey()) // for replicated map
|
||||
return false;
|
||||
shouldBreak = predicate.test(c);
|
||||
shouldBreak = !predicate.test(c);
|
||||
c.closeKey0();
|
||||
// release all exclusive locks: possibly if context.remove() is performed
|
||||
// in the callback, or acquired manually
|
||||
while (c.writeLockCount > 0) {
|
||||
|
||||
Reference in New Issue
Block a user