public static void startThread ( Thread thread ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "Starting background thread: " + thread ) ; } ExecutorService executor = getTaskExecutor ( ) ; if ( executor != null ) { executor . execute ( thread ) ; } else { thread . start ( ) ; } }
Starts a thread . If an executor service is available that is used . Otherwise the thread s start method is called .