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