From 9d3828bbe91d7bc7aad6e34c719c4591593be84d Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Wed, 30 Nov 2011 20:14:57 +0100 Subject: [PATCH] Use LinkedTransferQueue for OMATPE --- .../execution/OrderedMemoryAwareThreadPoolExecutor.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 ede4134cd0..c6949eff20 100644 --- a/src/main/java/org/jboss/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java +++ b/src/main/java/org/jboss/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java @@ -16,9 +16,9 @@ package org.jboss.netty.handler.execution; import java.util.IdentityHashMap; +import java.util.Queue; import java.util.Set; import java.util.WeakHashMap; -import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.Executor; import java.util.concurrent.ThreadFactory; @@ -31,6 +31,7 @@ import org.jboss.netty.channel.ChannelState; import org.jboss.netty.channel.ChannelStateEvent; import org.jboss.netty.util.ObjectSizeEstimator; import org.jboss.netty.util.internal.ConcurrentIdentityWeakKeyHashMap; +import org.jboss.netty.util.internal.LinkedTransferQueue; /** * A {@link MemoryAwareThreadPoolExecutor} which makes sure the events from the @@ -285,7 +286,7 @@ public class OrderedMemoryAwareThreadPoolExecutor extends } private final class ChildExecutor implements Executor, Runnable { - private final ConcurrentLinkedQueue tasks = new ConcurrentLinkedQueue(); + private final Queue tasks = new LinkedTransferQueue(); private final AtomicBoolean isRunning = new AtomicBoolean(false); ChildExecutor() {