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'
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
version = "1.1.12"
|
version = "1.1.13"
|
||||||
group = "dev.zontreck"
|
group = "dev.zontreck"
|
||||||
archivesBaseName = "LibAC"
|
archivesBaseName = "LibAC"
|
||||||
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||||
|
|
|
@ -77,9 +77,9 @@ public abstract class Task extends TimerTask implements Runnable
|
||||||
while(!task.isComplete())
|
while(!task.isComplete())
|
||||||
{
|
{
|
||||||
try {
|
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());
|
System.out.printf("\r"+task.TASK_NAME+"\t\t"+spinner.getSpinnerTick());
|
||||||
}catch(Exception e)
|
}catch(Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -122,6 +122,7 @@ public class DelayedExecutorService {
|
||||||
private static void stopRepeatingThread()
|
private static void stopRepeatingThread()
|
||||||
{
|
{
|
||||||
repeater.shutdown();
|
repeater.shutdown();
|
||||||
|
repeater.shutdownNow();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onTick()
|
public void onTick()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue