public synchronized void shutdownImmediately ( ) { if ( ! this . isShutdown ) { final Thread runner = this . taskRunnerThread ; this . isShutdown = true ; if ( runner != null && runner . isAlive ( ) ) { runner . interrupt ( ) ; } this . taskQueue . cancelAllTasks ( ) ; } }
Shuts down this timer immediately interrupting the wait state associated with the current head of the task queue or the wait state internal to the currently executing task if any such state is currently in effect .