1
zj
2024-11-12 cd95c9114fcbb3fc65c666b8b86c378f9a96d55b
bitgetsClient/src/main/java/org/example/bitgetsclient/ThreadConfig/AsyncConfiguration.java
@@ -18,9 +18,9 @@
    public ThreadPoolTaskExecutor threadPoolTaskExecutor() {
        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
        executor.setCorePoolSize(20);    // 核心线程数, 根据需求进行调整
        executor.setMaxPoolSize(30);    // 最大线程数, 适当设置以避免资源耗尽
        executor.setQueueCapacity(100);    // 队列容量, 适当限制以避免请求堆积
        executor.setCorePoolSize(50);    // 核心线程数, 根据需求进行调整
        executor.setMaxPoolSize(100);    // 最大线程数, 适当设置以避免资源耗尽
        executor.setQueueCapacity(150);    // 队列容量, 适当限制以避免请求堆积
        executor.setKeepAliveSeconds(30);    // 线程空闲时的存活时间为30秒,减少系统开销
        executor.setThreadNamePrefix("Thread-");    // 线程名称的前缀