Browse Source

优化任务队列满时任务拒绝策略

pull/294/MERGE
RuoYi 3 years ago
parent
commit
248fe926c5
  1. 3
      ruoyi-common/src/main/java/com/ruoyi/common/config/thread/ThreadPoolConfig.java

3
ruoyi-common/src/main/java/com/ruoyi/common/config/thread/ThreadPoolConfig.java

@ -49,7 +49,8 @@ public class ThreadPoolConfig
protected ScheduledExecutorService scheduledExecutorService()
{
return new ScheduledThreadPoolExecutor(corePoolSize,
new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build())
new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build(),
new ThreadPoolExecutor.CallerRunsPolicy())
{
@Override
protected void afterExecute(Runnable r, Throwable t)

Loading…
Cancel
Save