All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.slack.api.util.thread.DaemonThreadExecutorServiceFactory Maven / Gradle / Ivy

There is a newer version: 1.44.1
Show newest version
package com.slack.api.util.thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;

// Use ExecutorServiceProvider interface instead
public abstract class DaemonThreadExecutorServiceFactory {

    public static ExecutorService createDaemonThreadPoolExecutor(String threadGroupName, int poolSize) {
        return Executors.newFixedThreadPool(poolSize, new DaemonThreadFactory(threadGroupName));
    }

    public static ScheduledExecutorService createDaemonThreadScheduledExecutor(String threadGroupName) {
        return Executors.newSingleThreadScheduledExecutor(new DaemonThreadFactory(threadGroupName));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy