public boolean isLowOnThreads ( ) { if ( executor instanceof ThreadPoolExecutor ) { final ThreadPoolExecutor tpe = ( ThreadPoolExecutor ) executor ; return tpe . getActiveCount ( ) >= tpe . getMaximumPoolSize ( ) ; } return false ; }
Is the pool low on threads ?