package io.wdd.server.config;

import com.google.common.util.concurrent.ThreadFactoryBuilder;

import java.util.concurrent.*;

public class ServerCommonPool {

    public static ExecutorService pool;

    static {

        ThreadFactory threadFactory = new ThreadFactoryBuilder()
                .setPriority(5)
                .setNameFormat("server-pool-%d")
                .setDaemon(true)
                .build();

        pool = new ThreadPoolExecutor(
                10,
                30,
                500L,
                TimeUnit.MILLISECONDS,
                new ArrayBlockingQueue<>(10,true),
                threadFactory,
                new ThreadPoolExecutor.AbortPolicy()
        );

    }





}
