Skip to content

Commit

Permalink
Update DaemonPoolExecutor.java
Browse files Browse the repository at this point in the history
  • Loading branch information
apete committed Oct 16, 2024
1 parent 164821b commit 2575eef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/ojalgo/concurrent/DaemonPoolExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Runnable>(), DaemonPoolExecutor.newThreadFactory("ojAlgo-daemon-"));
new SynchronousQueue<>(), DaemonPoolExecutor.newThreadFactory("ojAlgo-daemon-"));

/**
* @see java.util.concurrent.AbstractExecutorService#submit(java.util.concurrent.Callable)
Expand Down Expand Up @@ -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));
}

Expand Down

0 comments on commit 2575eef

Please sign in to comment.