ThreadPoolExecutor的使用方法与分页查询数据实例

ThreadPoolExecutor

构造方法

ThreadPoolExecutor提供了四个构造方法,下面为参数最多的那个构造方法

 public ThreadPoolExecutor(int corePoolSize, // 1
                              int maximumPoolSize,  // 2
                              long keepAliveTime,  // 3
                              TimeUnit unit,  // 4
                              BlockingQueue<Runnable> workQueue, // 5
                              ThreadFactory threadFactory,  // 6
                              RejectedExecutionHandler handler ) { //7
        // ....
    }

ycyin大约 14 分钟多线程ThreadPoolExecutor多线程线程池