Java tutorial
//package com.java2s; public class Main { public static Thread runAsync(Runnable runnable, String threadName) { return runAsync(runnable, threadName, false); } public static Thread runAsync(Runnable runnable, String threadName, boolean daemon) { Thread thread = new Thread(runnable, threadName); thread.setDaemon(daemon); thread.start(); return thread; } }