01: /*
02: * $Id: DaemonThreadFactory.java 8077 2007-08-27 20:15:25Z aperepel $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
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
16: ThreadFactory {
17:
18: public DaemonThreadFactory(String name) {
19: super (name);
20: }
21:
22: public Thread newThread(Runnable runnable) {
23: Thread t = super .newThread(runnable);
24: t.setDaemon(true);
25: return t;
26: }
27:
28: }
|