mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-07-03 05:47:26 +00:00
[Change] Issue #12 调整框架启动机器人应用的方式, 增加一个用于机器人应用内部共享数据的类;
[Fix] BotEventHandler, ImageCacheStore 增加ShutdownHook用于关闭线程池, 解决线程池阻塞关闭过程的问题; [Change] BotEventHandler 调整'match(String)'方法; [Change] BotAdminCommandProcess 调整'savePushList()'方法对文件创建失败的行为;
This commit is contained in:
@ -33,6 +33,12 @@ public final class ImageCacheStore {
|
||||
|
||||
private final static ImageCacheHandler handler = new ImageCacheHandler();
|
||||
|
||||
static {
|
||||
Thread shutdownThread = new Thread(imageCacheExecutor::shutdownNow);
|
||||
shutdownThread.setName("Thread-ImageCacheShutdown");
|
||||
Runtime.getRuntime().addShutdownHook(shutdownThread);
|
||||
}
|
||||
|
||||
private ImageCacheStore() {}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user