This closes #1892
This commit is contained in:
commit
5955688dd9
|
@ -199,7 +199,7 @@ public class ConcurrentLongHashMap<V> {
|
||||||
private long[] keys;
|
private long[] keys;
|
||||||
private V[] values;
|
private V[] values;
|
||||||
|
|
||||||
private int capacity;
|
private volatile int capacity;
|
||||||
private volatile int size;
|
private volatile int size;
|
||||||
private int usedBuckets;
|
private int usedBuckets;
|
||||||
private int resizeThreshold;
|
private int resizeThreshold;
|
||||||
|
@ -457,10 +457,10 @@ public class ConcurrentLongHashMap<V> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
capacity = newCapacity;
|
|
||||||
keys = newKeys;
|
keys = newKeys;
|
||||||
values = newValues;
|
values = newValues;
|
||||||
usedBuckets = size;
|
usedBuckets = size;
|
||||||
|
capacity = newCapacity;
|
||||||
resizeThreshold = (int) (capacity * MapFillFactor);
|
resizeThreshold = (int) (capacity * MapFillFactor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -165,7 +165,7 @@ public class ConcurrentLongHashSet {
|
||||||
// Keys and values are stored interleaved in the table array
|
// Keys and values are stored interleaved in the table array
|
||||||
private long[] table;
|
private long[] table;
|
||||||
|
|
||||||
private int capacity;
|
private volatile int capacity;
|
||||||
private volatile int size;
|
private volatile int size;
|
||||||
private int usedBuckets;
|
private int usedBuckets;
|
||||||
private int resizeThreshold;
|
private int resizeThreshold;
|
||||||
|
@ -374,9 +374,9 @@ public class ConcurrentLongHashSet {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
capacity = newCapacity;
|
|
||||||
table = newTable;
|
table = newTable;
|
||||||
usedBuckets = size;
|
usedBuckets = size;
|
||||||
|
capacity = newCapacity;
|
||||||
resizeThreshold = (int) (capacity * SetFillFactor);
|
resizeThreshold = (int) (capacity * SetFillFactor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue