Here you can find the source of createDaemonThread(Runnable runnable, String threadName)
Parameter | Description |
---|---|
runnable | the runnable |
threadName | the thread name |
public static Thread createDaemonThread(Runnable runnable, String threadName)
//package com.java2s; //License from project: Apache License public class Main { /**/*from ww w . j a v a2 s. co m*/ * Creates a daemon thread. * * @param runnable the runnable * @param threadName the thread name * @return the thread */ public static Thread createDaemonThread(Runnable runnable, String threadName) { Thread daemonThread = new Thread(runnable, threadName); daemonThread.setDaemon(true); return daemonThread; } }