com.devcycle.sdk.server.local.managers.DaemonThreadFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-server-sdk Show documentation
Show all versions of java-server-sdk Show documentation
Server side SDK to interact with DevCycle.
package com.devcycle.sdk.server.local.managers;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
public class DaemonThreadFactory implements ThreadFactory {
private final ThreadFactory defaultThreadFactory = Executors.defaultThreadFactory();
public Thread newThread(Runnable r) {
Thread thread = defaultThreadFactory.newThread(r);
thread.setDaemon(true);
return thread;
}
}