Yu-Jack
3/11/2019 - 12:36 PM

ThreadPoolExecutor - 1.java

ThreadPoolExecutor executor = new ThreadPoolExecutor(
    int corePoolSize,
    int maxPoolSize,
    long keepAliveTime,
    TimeUnit unit,
    BlockingQueue<Runnable> workQueue,
    RejectedExecutionHandler handler
);

executor.execute(new Runnable() {
    public void run() {
        System.out.println("running");
    }
})