question: private void runNext ( ) { WorkerThread t = null ; HeadTaskRunnable task = null ; synchronized ( this ) { if ( shutdownThePool ) { return ; } else { while ( busyThreadCount == poolSize ) { try { wait ( ) ; if ( shutdownThePool ) { return ; } } catch ( Exception ex ) { if ( debug != null ) { debug . error ( "TimerPool:runNext() " + name , ex ) ; } } } if ( nextRun != null ) { long now = currentTimeMillis ( ) ; if ( nextRun . getTime ( ) <= now ) { if ( ( task = ( HeadTaskRunnable ) taskList . remove ( nextRun ) ) != null ) { t = getAvailableThread ( ) ; } } try { nextRun = ( Date ) taskList . firstKey ( ) ; long delay = nextRun . getTime ( ) - now ; scheduler . setDelay ( ( delay >= 0 ? delay : 0 ) ) ; } catch ( NoSuchElementException ex ) { nextRun = null ; scheduler . setDelay ( - 1 ) ; } } } } if ( ( t != null ) && ( task != null ) ) { t . runTask ( task ) ; } }
target:  Runs the next timeout task in the sorted container.