// //maximumPoolSize设置为2 ,拒绝策略为AbortPolic策略,直接抛出异常 ThreadPoolExecutor pool = new ThreadPoolExecutor(5, 10, 1000000, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(20000), Executors.defaultThreadFactory(),new ThreadPoolExecutor.AbortPolicy()…