mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
Correct core size of the pool
This commit is contained in:
parent
b83b1b78dc
commit
d195ebd299
@ -50,8 +50,9 @@ public class OssAutoConfiguration {
|
||||
@Bean(name = OSS_TASK_EXECUTOR_BEAN_NAME)
|
||||
@ConditionalOnMissingBean
|
||||
public ExecutorService ossTaskExecutor() {
|
||||
return new ThreadPoolExecutor(8, 128,
|
||||
60, TimeUnit.SECONDS, new SynchronousQueue<>());
|
||||
int coreSize = Runtime.getRuntime().availableProcessors();
|
||||
return new ThreadPoolExecutor(coreSize, 128, 60, TimeUnit.SECONDS,
|
||||
new SynchronousQueue<>());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user