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
|
@ -12,7 +12,7 @@ plugins {
|
|||
id 'maven-publish'
|
||||
}
|
||||
|
||||
version = "1.1.12"
|
||||
version = "1.1.13"
|
||||
group = "dev.zontreck"
|
||||
archivesBaseName = "LibAC"
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||
|
|
|
@ -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…
Reference in a new issue