mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-06-28 13:16:19 +08:00
消息去重所用线程池设置为daemon线程,否则jvm关闭后线程池仍不关闭。
This commit is contained in:
parent
db5826cfcf
commit
d19fec73d4
@ -34,7 +34,7 @@ public class WxMessageInMemoryDuplicateCheckerSingleton implements WxMessageDupl
|
|||||||
* 线程池
|
* 线程池
|
||||||
*/
|
*/
|
||||||
private static final ScheduledThreadPoolExecutor SCHEDULED_THREAD_POOL_EXECUTOR = new ScheduledThreadPoolExecutor(1,
|
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.
|
* 消息id->消息时间戳的map.
|
||||||
|
Loading…
Reference in New Issue
Block a user