Attempt to fix a null error
This commit is contained in:
parent
75557bf90c
commit
aba2f101dc
1 changed files with 2 additions and 4 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue