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

org.jsoftware.utils.retriable.RetriableThreadFactory Maven / Gradle / Ivy

The newest version!
package org.jsoftware.utils.retriable;

import java.util.concurrent.ThreadFactory;

/**
 * ThreadFactory for retriable
 * @author m-szalik
 */
class RetriableThreadFactory implements ThreadFactory {
    private int threadCount;

    @Override
    public Thread newThread(Runnable r) {
        Thread t = new Thread(r, "retriable-thread-" + threadCount);
        t.setDaemon(true);
        threadCount++;
        return t;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy