package hozza.network.security.threading.database;

import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;

public class TwitchCronThreadFactory implements ThreadFactory
{
    private final AtomicInteger threadNumber = new AtomicInteger(0);
    @SuppressWarnings("NullableProblems")
    @Override
    public Thread newThread(Runnable r) {
        Thread t = Executors.defaultThreadFactory().newThread(r);
        t.setName("MariaDB thread " + threadNumber.addAndGet(1));
        return t;
    }
    
}