Fix a bug in SpinnerTask and attempt to fix the DelayedExecutorService#stopRepeatingThread
This commit is contained in:
parent
7be51f52d6
commit
725217967b
3 changed files with 4 additions and 3 deletions
|
@ -77,9 +77,9 @@ public abstract class Task extends TimerTask implements Runnable
|
|||
while(!task.isComplete())
|
||||
{
|
||||
try {
|
||||
Thread.sleep(1000L);
|
||||
Thread.sleep(500L);
|
||||
|
||||
if(!isSilent)
|
||||
if(!task.isSilent && !task.isComplete())
|
||||
System.out.printf("\r"+task.TASK_NAME+"\t\t"+spinner.getSpinnerTick());
|
||||
}catch(Exception e)
|
||||
{
|
||||
|
|
|
@ -122,6 +122,7 @@ public class DelayedExecutorService {
|
|||
private static void stopRepeatingThread()
|
||||
{
|
||||
repeater.shutdown();
|
||||
repeater.shutdownNow();
|
||||
}
|
||||
|
||||
public void onTick()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue