diff --git a/src/main/java/org/jboss/netty/handler/execution/MemoryAwareThreadPoolExecutor.java b/src/main/java/org/jboss/netty/handler/execution/MemoryAwareThreadPoolExecutor.java index 07a51dcb23..b1b3e4715c 100644 --- a/src/main/java/org/jboss/netty/handler/execution/MemoryAwareThreadPoolExecutor.java +++ b/src/main/java/org/jboss/netty/handler/execution/MemoryAwareThreadPoolExecutor.java @@ -40,7 +40,7 @@ import org.jboss.netty.channel.ChannelState; import org.jboss.netty.channel.ChannelStateEvent; import org.jboss.netty.logging.InternalLogger; import org.jboss.netty.logging.InternalLoggerFactory; -import org.jboss.netty.util.ConcurrentHashMap; +import org.jboss.netty.util.ConcurrentIdentityHashMap; import org.jboss.netty.util.LinkedTransferQueue; /** @@ -90,7 +90,7 @@ public class MemoryAwareThreadPoolExecutor extends ThreadPoolExecutor { private volatile Settings settings; private final ConcurrentMap channelCounters = - new ConcurrentHashMap(); + new ConcurrentIdentityHashMap(); private final AtomicLong totalCounter = new AtomicLong(); private final Semaphore semaphore = new Semaphore(0); diff --git a/src/main/java/org/jboss/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java b/src/main/java/org/jboss/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java index 3675e312e9..26b74193a6 100644 --- a/src/main/java/org/jboss/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java +++ b/src/main/java/org/jboss/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java @@ -32,7 +32,7 @@ import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelEvent; import org.jboss.netty.channel.ChannelState; import org.jboss.netty.channel.ChannelStateEvent; -import org.jboss.netty.util.ConcurrentHashMap; +import org.jboss.netty.util.ConcurrentIdentityHashMap; /** * A {@link MemoryAwareThreadPoolExecutor} which maintains the @@ -66,7 +66,7 @@ public class OrderedMemoryAwareThreadPoolExecutor extends MemoryAwareThreadPoolExecutor { private final ConcurrentMap childExecutors = - new ConcurrentHashMap(); + new ConcurrentIdentityHashMap(); /** * Creates a new instance.