mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-21 02:25:56 +08:00
Pre Merge pull request !185 from zszdevelop/zsz-threadpool
This commit is contained in:
commit
d4dfa74f34
@ -33,8 +33,8 @@ public class ThreadPoolConfig {
|
||||
@ConditionalOnProperty(prefix = "thread-pool", name = "enabled", havingValue = "true")
|
||||
public ThreadPoolTaskExecutor threadPoolTaskExecutor() {
|
||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||
executor.setMaxPoolSize(core);
|
||||
executor.setCorePoolSize(core * 2);
|
||||
executor.setMaxPoolSize(core * 2);
|
||||
executor.setCorePoolSize(core);
|
||||
executor.setQueueCapacity(threadPoolProperties.getQueueCapacity());
|
||||
executor.setKeepAliveSeconds(threadPoolProperties.getKeepAliveSeconds());
|
||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user