1
0
mirror of synced 2025-12-17 21:18:07 +08:00

消息去重所用线程池设置为daemon线程,否则jvm关闭后线程池仍不关闭。

This commit is contained in:
vishun
2022-08-30 13:39:57 +08:00
parent db5826cfcf
commit d19fec73d4

View File

@@ -34,7 +34,7 @@ public class WxMessageInMemoryDuplicateCheckerSingleton implements WxMessageDupl
* 线程池
*/
private static final ScheduledThreadPoolExecutor SCHEDULED_THREAD_POOL_EXECUTOR = new ScheduledThreadPoolExecutor(1,
new ThreadFactoryBuilder().setNameFormat("wxMessage-memory-pool-%d").build(), new ThreadPoolExecutor.AbortPolicy());
new ThreadFactoryBuilder().setNameFormat("wxMessage-memory-pool-%d").setDaemon(true).build(), new ThreadPoolExecutor.AbortPolicy());
/**
* 消息id->消息时间戳的map.