提交 836d37e3 authored 作者: Thomas Mueller's avatar Thomas Mueller

A concurrent linked list, to replace the array list of old roots (work in progress)

上级 45034815
......@@ -995,7 +995,8 @@ public class MVMap<K, V> extends AbstractMap<K, V>
if (oldest == -1) {
return;
}
if (oldRootsList.peekFirst() == oldRootsList.peekLast()) {
Page last = oldRootsList.peekLast();
if (oldRootsList.peekFirst() == last) {
// do nothing if there is no or only one entry
return;
}
......@@ -1004,7 +1005,7 @@ public class MVMap<K, V> extends AbstractMap<K, V>
oldest--;
while (true) {
Page p = oldRootsList.peekFirst();
if (p == null || p.getVersion() >= oldest) {
if (p == null || p.getVersion() >= oldest || p == last) {
break;
}
oldRootsList.removeFirst(p);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论