This commit is contained in:
张良(004796)
2024-01-30 15:36:16 +08:00
parent ca2d8d8941
commit 25ad9038a8
7 changed files with 555 additions and 10 deletions

View File

@@ -17,15 +17,14 @@ public class YunExecutor {
public static Executor YUN_EXECUTOR;
static {
ThreadPoolExecutor roomExecutor = new ThreadPoolExecutor(CPU_NUM,
YUN_EXECUTOR = new ThreadPoolExecutor(CPU_NUM,
CPU_NUM << 2,
5,
TimeUnit.SECONDS,
new ArrayBlockingQueue<>(5),
init("yunxinThreadPoll-%d"),
new ThreadPoolExecutor.CallerRunsPolicy());
YUN_EXECUTOR = TtlExecutors.getTtlExecutor(roomExecutor);
// YUN_EXECUTOR = TtlExecutors.getTtlExecutor(roomExecutor);
}
private static ThreadFactory init(String nameFormat){