Change thread pool size

This commit is contained in:
Aria 2023-05-08 17:02:49 -07:00
parent c9feb419e5
commit 0917ad4173

View file

@ -17,10 +17,10 @@ public class DelayedExecutorService {
private static final AtomicBoolean RUN = new AtomicBoolean(true); private static final AtomicBoolean RUN = new AtomicBoolean(true);
private static AtomicInteger COUNT = new AtomicInteger(0); private static AtomicInteger COUNT = new AtomicInteger(0);
private static final DelayedExecutorService inst; private static final DelayedExecutorService inst;
private static final ScheduledThreadPoolExecutor repeater; private static ScheduledThreadPoolExecutor repeater;
static{ static{
inst=new DelayedExecutorService(); inst=new DelayedExecutorService();
repeater = new ScheduledThreadPoolExecutor(20); repeater = new ScheduledThreadPoolExecutor(8);
repeater.scheduleAtFixedRate(new Runnable() { repeater.scheduleAtFixedRate(new Runnable() {
@Override @Override
@ -37,7 +37,7 @@ public class DelayedExecutorService {
public static void setup() public static void setup()
{ {
stopRepeatingThread(); stopRepeatingThread();
repeater = new ScheduledThreadPoolExecutor(8);
repeater.schedule(new Runnable() { repeater.schedule(new Runnable() {
@Override @Override
public void run() { public void run() {