package com.tofly.xrtygis.util;


import java.util.concurrent.*;

/**
 * @author FlashWJL
 * @date 2021/9/18 14:49
 */
public class ThreadPoolUtil {
    /**
     * 默认5个线程，当五个线程满了过后，存到队列里面，如果队列里面超过300个，则创建新线程，最大线程10个
     */
    public static final ExecutorService executorService = new ThreadPoolExecutor(5, 10, 100, TimeUnit.MICROSECONDS,
                new ArrayBlockingQueue<>(300),Executors.defaultThreadFactory(),new ThreadPoolExecutor.AbortPolicy());

}
