From 405bbd9d90b51764c3fe42bead214b022be6cd2a Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 17 Feb 2023 15:26:24 +0100 Subject: NanoHTTPD: Switch back to growing thread pool --- src/main/java/fi/iki/elonen/NanoHTTPD.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/fi/iki/elonen/NanoHTTPD.java b/src/main/java/fi/iki/elonen/NanoHTTPD.java index d3582fa..1795624 100644 --- a/src/main/java/fi/iki/elonen/NanoHTTPD.java +++ b/src/main/java/fi/iki/elonen/NanoHTTPD.java @@ -63,10 +63,10 @@ import java.util.StringTokenizer; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ExecutorService; import java.util.concurrent.RejectedExecutionException; -import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import org.apache.commons.io.output.ByteArrayOutputStream; +import org.openslx.util.GrowingThreadPoolExecutor; import org.openslx.util.PrioThreadFactory; import org.openslx.util.Util; @@ -178,8 +178,8 @@ public abstract class NanoHTTPD implements Runnable */ public NanoHTTPD( String hostname, int port, int maxThreads, int maxQueue ) throws IOException { - this( hostname, port, new ThreadPoolExecutor( 2, maxThreads, 1, TimeUnit.MINUTES, - new ArrayBlockingQueue( maxQueue ), new PrioThreadFactory( "httpd", Thread.NORM_PRIORITY ) ) ); + this( hostname, port, new GrowingThreadPoolExecutor( 2, maxThreads, 1, TimeUnit.MINUTES, + new ArrayBlockingQueue( maxQueue ), new PrioThreadFactory( "httpd" ) ) ); } /** -- cgit v1.2.3-55-g7522