Attempt to fix a null error

This commit is contained in:
Zontreck 2024-02-18 09:18:18 -07:00
parent 75557bf90c
commit aba2f101dc

View file

@ -20,7 +20,7 @@ public class DelayedExecutorService {
private static ScheduledThreadPoolExecutor repeater;
static{
inst=new DelayedExecutorService();
repeater = new ScheduledThreadPoolExecutor(2);
repeater = new ScheduledThreadPoolExecutor(16);
}
private DelayedExecutorService(){}
@ -47,8 +47,6 @@ public class DelayedExecutorService {
*/
public static void setup()
{
stopRepeatingThread();
repeater = new ScheduledThreadPoolExecutor(16);
repeater.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
@ -140,7 +138,7 @@ public class DelayedExecutorService {
private static void stopRepeatingThread()
{
repeater.shutdownNow();
repeater=null; // Dispose of so the threads get torn down and the program can stop successfully
//repeater=null; // Dispose of so the threads get torn down and the program can stop successfully
}
public void onTick()