Java examples for java.util.concurrent:Executors
invoke On Background Executors Thread
//package com.java2s; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public class Main { public static void invokeOnBackgroundThread(Runnable runnable) { ExecutorService executor = Executors.newSingleThreadExecutor(); executor.execute(runnable);//from ww w.j a v a2s.c o m executor.shutdown(); } }