mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-19 15:09:25 +00:00
3.6.16
This commit is contained in:
@@ -72,27 +72,11 @@ public class WorldScheduler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void shutdownScheduler() {
|
public void shutdownScheduler() {
|
||||||
this.scheduler.shutdown();
|
this.scheduler.shutdownNow();
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void shutdownExecutor() {
|
public void shutdownExecutor() {
|
||||||
this.worker.shutdown();
|
this.worker.shutdownNow();
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void reportRunningTasks(Predicate<Thread> predicate) {
|
private void reportRunningTasks(Predicate<Thread> predicate) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Project settings
|
# Project settings
|
||||||
# Rule: [major update].[feature update].[bug fix]
|
# Rule: [major update].[feature update].[bug fix]
|
||||||
project_version=3.6.15
|
project_version=3.6.16
|
||||||
config_version=41
|
config_version=41
|
||||||
project_group=net.momirealms
|
project_group=net.momirealms
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user