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;
|
private static ScheduledThreadPoolExecutor repeater;
|
||||||
static{
|
static{
|
||||||
inst=new DelayedExecutorService();
|
inst=new DelayedExecutorService();
|
||||||
repeater = new ScheduledThreadPoolExecutor(2);
|
repeater = new ScheduledThreadPoolExecutor(16);
|
||||||
}
|
}
|
||||||
private DelayedExecutorService(){}
|
private DelayedExecutorService(){}
|
||||||
|
|
||||||
|
@ -47,8 +47,6 @@ public class DelayedExecutorService {
|
||||||
*/
|
*/
|
||||||
public static void setup()
|
public static void setup()
|
||||||
{
|
{
|
||||||
stopRepeatingThread();
|
|
||||||
repeater = new ScheduledThreadPoolExecutor(16);
|
|
||||||
repeater.scheduleAtFixedRate(new Runnable() {
|
repeater.scheduleAtFixedRate(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -140,7 +138,7 @@ public class DelayedExecutorService {
|
||||||
private static void stopRepeatingThread()
|
private static void stopRepeatingThread()
|
||||||
{
|
{
|
||||||
repeater.shutdownNow();
|
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()
|
public void onTick()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue