com.kraken.api.javawrapper.threading.DaemonThreadFactory Maven / Gradle / Ivy
package com.kraken.api.javawrapper.threading;
import org.jetbrains.annotations.NotNull;
import java.util.concurrent.ThreadFactory;
public class DaemonThreadFactory implements ThreadFactory {
@Override
public Thread newThread(@NotNull Runnable r) {
Thread thread = new Thread(r);
thread.setDaemon(true);
return thread;
}
}