public void shutdown ( ) { if ( isShutdown . compareAndSet ( false , true ) ) { executorService . shutdown ( ) ; if ( autoScaler != null ) { autoScaler . shutdown ( ) ; } } }
Mark task scheduler as shutdown and shutdown any thread pool executors created .