From 2575eef868b01812331a83ae97c09880c0d785cb Mon Sep 17 00:00:00 2001 From: apete Date: Wed, 16 Oct 2024 07:31:16 +0200 Subject: [PATCH] Update DaemonPoolExecutor.java --- src/main/java/org/ojalgo/concurrent/DaemonPoolExecutor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/ojalgo/concurrent/DaemonPoolExecutor.java b/src/main/java/org/ojalgo/concurrent/DaemonPoolExecutor.java index c90147a3c..b05177ac8 100644 --- a/src/main/java/org/ojalgo/concurrent/DaemonPoolExecutor.java +++ b/src/main/java/org/ojalgo/concurrent/DaemonPoolExecutor.java @@ -32,7 +32,7 @@ public final class DaemonPoolExecutor extends ThreadPoolExecutor { private static final ThreadGroup GROUP = new ThreadGroup("ojAlgo-daemon-group"); static final DaemonPoolExecutor INSTANCE = new DaemonPoolExecutor(OjAlgoUtils.ENVIRONMENT.units, Integer.MAX_VALUE, 5L, TimeUnit.SECONDS, - new SynchronousQueue(), DaemonPoolExecutor.newThreadFactory("ojAlgo-daemon-")); + new SynchronousQueue<>(), DaemonPoolExecutor.newThreadFactory("ojAlgo-daemon-")); /** * @see java.util.concurrent.AbstractExecutorService#submit(java.util.concurrent.Callable) @@ -72,7 +72,7 @@ public static ExecutorService newFixedThreadPool(final String name, final int nT /** * Like {@link Executors#newScheduledThreadPool(int)} but with identifiable (daemon) threads */ - public static ExecutorService newScheduledThreadPool(final String name, final int corePoolSize) { + public static ScheduledExecutorService newScheduledThreadPool(final String name, final int corePoolSize) { return Executors.newScheduledThreadPool(corePoolSize, DaemonPoolExecutor.newThreadFactory(name)); }