9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-19 15:09:25 +00:00
This commit is contained in:
XiaoMoMi
2024-10-12 01:30:11 +08:00
parent ff6983d35b
commit 98f4ec033c
2 changed files with 3 additions and 19 deletions

View File

@@ -72,27 +72,11 @@ public class WorldScheduler {
}
public void shutdownScheduler() {
this.scheduler.shutdown();
try {
if (!this.scheduler.awaitTermination(1, TimeUnit.MINUTES)) {
this.plugin.getPluginLogger().severe("Timed out waiting for the CustomCrops scheduler to terminate");
reportRunningTasks(thread -> thread.getName().equals("customcrops-world-scheduler"));
}
} catch (InterruptedException e) {
e.printStackTrace();
}
this.scheduler.shutdownNow();
}
public void shutdownExecutor() {
this.worker.shutdown();
try {
if (!this.worker.awaitTermination(1, TimeUnit.MINUTES)) {
this.plugin.getPluginLogger().severe("Timed out waiting for the CustomCrops worker thread pool to terminate");
reportRunningTasks(thread -> thread.getName().startsWith("customcrops-world-worker-"));
}
} catch (InterruptedException e) {
e.printStackTrace();
}
this.worker.shutdownNow();
}
private void reportRunningTasks(Predicate<Thread> predicate) {

View File

@@ -1,6 +1,6 @@
# Project settings
# Rule: [major update].[feature update].[bug fix]
project_version=3.6.15
project_version=3.6.16
config_version=41
project_group=net.momirealms