1 10 11 package org.mule.util.concurrent; 12 13 import edu.emory.mathcs.backport.java.util.concurrent.ThreadFactory; 14 15 public class DaemonThreadFactory extends NamedThreadFactory implements ThreadFactory 16 { 17 18 public DaemonThreadFactory(String name) 19 { 20 this(name, Thread.NORM_PRIORITY); 21 } 22 23 public DaemonThreadFactory(String name, int priority) 24 { 25 super(name, priority); 26 } 27 28 public Thread newThread(Runnable runnable) 29 { 30 Thread t = super.newThread(runnable); 31 t.setDaemon(true); 32 return t; 33 } 34 35 } 36 | Popular Tags |