Here you can find the source of createExecutor()
public static ScheduledExecutorService createExecutor()
//package com.java2s; //License from project: Open Source License import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ThreadFactory; public class Main { public static ScheduledExecutorService createExecutor() { return Executors.newSingleThreadScheduledExecutor(daemonThreadFactory()); }/*from w w w . j a v a 2 s. c o m*/ public static ThreadFactory daemonThreadFactory() { return new ThreadFactory() { public Thread newThread(Runnable p_r) { Thread thread = new Thread(p_r); thread.setDaemon(true); return thread; } }; } }