Use FastThreadLocal in more places
This commit is contained in:
parent
b737d631f1
commit
e88262861a
@ -207,7 +207,7 @@ public class ThreadLocalRandom extends Random {
|
|||||||
* The actual ThreadLocal
|
* The actual ThreadLocal
|
||||||
*/
|
*/
|
||||||
private static final ThreadLocal<ThreadLocalRandom> localRandom =
|
private static final ThreadLocal<ThreadLocalRandom> localRandom =
|
||||||
new ThreadLocal<ThreadLocalRandom>() {
|
new FastThreadLocal<ThreadLocalRandom>() {
|
||||||
protected ThreadLocalRandom initialValue() {
|
protected ThreadLocalRandom initialValue() {
|
||||||
return new ThreadLocalRandom();
|
return new ThreadLocalRandom();
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
package io.netty.util.internal.chmv8;
|
package io.netty.util.internal.chmv8;
|
||||||
|
|
||||||
|
import io.netty.util.internal.FastThreadLocal;
|
||||||
|
|
||||||
import java.io.ObjectStreamField;
|
import java.io.ObjectStreamField;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.lang.reflect.ParameterizedType;
|
import java.lang.reflect.ParameterizedType;
|
||||||
@ -6032,7 +6034,7 @@ public class ConcurrentHashMapV8<K,V>
|
|||||||
* Per-thread counter hash codes. Shared across all instances.
|
* Per-thread counter hash codes. Shared across all instances.
|
||||||
*/
|
*/
|
||||||
static final ThreadLocal<CounterHashCode> threadCounterHashCode =
|
static final ThreadLocal<CounterHashCode> threadCounterHashCode =
|
||||||
new ThreadLocal<CounterHashCode>();
|
new FastThreadLocal<CounterHashCode>();
|
||||||
|
|
||||||
|
|
||||||
final long sumCount() {
|
final long sumCount() {
|
||||||
|
Loading…
Reference in New Issue
Block a user