CameraAsync.java 1017 B

1234567891011121314151617181920212223242526
  1. package com.sckj.camera.config;//package com.sckj.camera.config;
  2. //
  3. //import org.springframework.context.annotation.Bean;
  4. //import org.springframework.context.annotation.Configuration;
  5. //import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
  6. //
  7. //import java.util.concurrent.Executor;
  8. //import java.util.concurrent.ThreadPoolExecutor;
  9. //
  10. //@Configuration
  11. //public class CameraAsync {
  12. // @Bean(name = "taskExecutor")
  13. // public Executor taskExecutor() {
  14. // ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
  15. // executor.setCorePoolSize(15);
  16. // executor.setMaxPoolSize(50);
  17. // executor.setQueueCapacity(150);
  18. //
  19. // executor.setKeepAliveSeconds(60);
  20. // executor.setThreadNamePrefix("camExecutor-");
  21. // executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
  22. // executor.setWaitForTasksToCompleteOnShutdown(true);
  23. // executor.setAwaitTerminationSeconds(60);
  24. // return executor;
  25. // }
  26. //}