Use FastThreadLocal in more places

This commit is contained in:
Trustin Lee 2014-06-14 17:45:43 +09:00
parent b737d631f1
commit e88262861a
2 changed files with 4 additions and 2 deletions

View File

@ -207,7 +207,7 @@ public class ThreadLocalRandom extends Random {
* The actual ThreadLocal
*/
private static final ThreadLocal<ThreadLocalRandom> localRandom =
new ThreadLocal<ThreadLocalRandom>() {
new FastThreadLocal<ThreadLocalRandom>() {
protected ThreadLocalRandom initialValue() {
return new ThreadLocalRandom();
}

View File

@ -22,6 +22,8 @@
package io.netty.util.internal.chmv8;
import io.netty.util.internal.FastThreadLocal;
import java.io.ObjectStreamField;
import java.io.Serializable;
import java.lang.reflect.ParameterizedType;
@ -6032,7 +6034,7 @@ public class ConcurrentHashMapV8<K,V>
* Per-thread counter hash codes. Shared across all instances.
*/
static final ThreadLocal<CounterHashCode> threadCounterHashCode =
new ThreadLocal<CounterHashCode>();
new FastThreadLocal<CounterHashCode>();
final long sumCount() {