package com.css.simulation.resource.scheduler.infra.threadpool;

import org.glassfish.jersey.internal.guava.ThreadFactoryBuilder;

import java.util.concurrent.*;

/**
 * @author lcy
 * @date 2024/4/10 21:01
 */
public class ThreadPool {
    private static final ThreadFactory sceneEvaluationComputeFactory = new ThreadFactoryBuilder()
            .setNameFormat("scene-evaluation-compute-pool-%d").build();

    public static ExecutorService sceneEvaluationComputePool = new ThreadPoolExecutor(5, 200,
            0L, TimeUnit.MILLISECONDS,
            new LinkedBlockingQueue<>(1024), sceneEvaluationComputeFactory, new ThreadPoolExecutor.AbortPolicy());

}
