From 76607e20a5264b95249c0ef62d1d7586eb538ffa Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Mon, 18 Mar 2013 16:19:58 +1100 Subject: [PATCH] 403591 do not use the ConcurrentArrayBlockingQueue for thread pool, selector and async request log --- .../src/main/java/org/eclipse/jetty/io/SelectorManager.java | 1 + .../java/org/eclipse/jetty/util/thread/QueuedThreadPool.java | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java b/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java index 8c5f6445fb3..1a1f7f4221b 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java @@ -319,6 +319,7 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa public class ManagedSelector extends AbstractLifeCycle implements Runnable, Dumpable { private final Queue _changes = new ConcurrentArrayQueue<>(); + private final int _id; private Selector _selector; private volatile Thread _thread; diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/QueuedThreadPool.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/QueuedThreadPool.java index 209832be023..a852b8feed8 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/QueuedThreadPool.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/QueuedThreadPool.java @@ -31,7 +31,6 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; import org.eclipse.jetty.util.BlockingArrayQueue; -import org.eclipse.jetty.util.ConcurrentArrayBlockingQueue; import org.eclipse.jetty.util.StringUtil; import org.eclipse.jetty.util.annotation.ManagedAttribute; import org.eclipse.jetty.util.annotation.ManagedObject; @@ -92,7 +91,7 @@ public class QueuedThreadPool extends AbstractLifeCycle implements SizedThreadPo setStopTimeout(5000); if (queue==null) - queue=new ConcurrentArrayBlockingQueue.Unbounded(); + queue=new BlockingArrayQueue(_minThreads, _minThreads);// TODO ConcurrentArrayBlockingQueue.Unbounded(); _jobs=queue; } @@ -178,7 +177,6 @@ public class QueuedThreadPool extends AbstractLifeCycle implements SizedThreadPo { _joinLock.notifyAll(); } - jobs.clear(); } /**