OnJava8-Examples/net/mindview/util/DaemonThreadFactory.java
2015-05-05 11:20:13 -07:00

13 lines
297 B
Java

//: net/mindview/util/DaemonThreadFactory.java
package net.mindview.util;
import java.util.concurrent.*;
public class DaemonThreadFactory implements ThreadFactory {
@Override
public Thread newThread(Runnable r) {
Thread t = new Thread(r);
t.setDaemon(true);
return t;
}
} ///:~