1234567891011121314151617181920212223242526 |
- package com.sckj.camera.config;//package com.sckj.camera.config;
- //
- //import org.springframework.context.annotation.Bean;
- //import org.springframework.context.annotation.Configuration;
- //import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
- //
- //import java.util.concurrent.Executor;
- //import java.util.concurrent.ThreadPoolExecutor;
- //
- //@Configuration
- //public class CameraAsync {
- // @Bean(name = "taskExecutor")
- // public Executor taskExecutor() {
- // ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
- // executor.setCorePoolSize(15);
- // executor.setMaxPoolSize(50);
- // executor.setQueueCapacity(150);
- //
- // executor.setKeepAliveSeconds(60);
- // executor.setThreadNamePrefix("camExecutor-");
- // executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
- // executor.setWaitForTasksToCompleteOnShutdown(true);
- // executor.setAwaitTerminationSeconds(60);
- // return executor;
- // }
- //}
|