From 16d22828fd96c2970c8c4f9292df3c175bea95c7 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Mon, 11 Nov 2013 14:06:41 +1100 Subject: [PATCH] 416477 - QueuedThreadPool does not reuse interrupted threads --- .../java/org/eclipse/jetty/util/thread/QueuedThreadPool.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 3f12be95b4b..c5bb1d15f17 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 @@ -535,12 +535,14 @@ public class QueuedThreadPool extends AbstractLifeCycle implements SizedThreadPo startThreads(1); } - while (isRunning()) + loop: while (isRunning()) { // Job loop while (job != null && isRunning()) { runJob(job); + if (Thread.interrupted()) + break loop; job = _jobs.poll(); }