refactor(listIdentity): 线程池命名
This commit is contained in:
parent
a354d44b39
commit
39a89c9f22
@ -1,5 +1,6 @@
|
||||
package cn.axzo.tyr.server.config;
|
||||
|
||||
import cn.hutool.core.thread.NamedThreadFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@ -26,7 +27,7 @@ public class ExecutorConfig {
|
||||
new ThreadPoolExecutor.CallerRunsPolicy();
|
||||
int coreSize = 5;
|
||||
ThreadPoolExecutor executor = new ThreadPoolExecutor(coreSize, 30, 60, TimeUnit.SECONDS,
|
||||
new ArrayBlockingQueue<>(50), r -> new Thread(r, "TYR-AUTH-EXECUTOR"), new ThreadPoolExecutor.CallerRunsPolicy() {
|
||||
new ArrayBlockingQueue<>(50), new NamedThreadFactory("TYR-AUTH-EXECUTOR", false), new ThreadPoolExecutor.CallerRunsPolicy() {
|
||||
@Override
|
||||
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
|
||||
log.warn("auth executor rejected , use caller runs");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user