This commit is contained in:
Clebert Suconic 2018-02-22 20:47:42 -05:00
commit 5955688dd9
2 changed files with 4 additions and 4 deletions

View File

@ -199,7 +199,7 @@ public class ConcurrentLongHashMap<V> {
private long[] keys;
private V[] values;
private int capacity;
private volatile int capacity;
private volatile int size;
private int usedBuckets;
private int resizeThreshold;
@ -457,10 +457,10 @@ public class ConcurrentLongHashMap<V> {
}
}
capacity = newCapacity;
keys = newKeys;
values = newValues;
usedBuckets = size;
capacity = newCapacity;
resizeThreshold = (int) (capacity * MapFillFactor);
}

View File

@ -165,7 +165,7 @@ public class ConcurrentLongHashSet {
// Keys and values are stored interleaved in the table array
private long[] table;
private int capacity;
private volatile int capacity;
private volatile int size;
private int usedBuckets;
private int resizeThreshold;
@ -374,9 +374,9 @@ public class ConcurrentLongHashSet {
}
}
capacity = newCapacity;
table = newTable;
usedBuckets = size;
capacity = newCapacity;
resizeThreshold = (int) (capacity * SetFillFactor);
}