Cleaned up local name

This commit is contained in:
nathan 2016-04-02 16:57:29 +02:00
parent 1ff379f079
commit 2b6d025cd1
1 changed files with 4 additions and 4 deletions

View File

@ -89,18 +89,18 @@ class ConcurrentIterator<T> {
ConcurrentEntry concurrentEntry = entries.get(listener);
if (concurrentEntry != null) {
ConcurrentEntry head1 = headREF.get(this);
ConcurrentEntry head = headREF.get(this);
if (concurrentEntry == head1) {
if (concurrentEntry == head) {
// if it was second, now it's first
head1 = head1.next();
head = head.next();
//oldHead.clear(); // optimize for GC not possible because of potentially running iterators
}
else {
concurrentEntry.remove();
}
headREF.lazySet(this, head1);
headREF.lazySet(this, head);
this.entries.remove(listener);
}
}