final boolean isRunningOrShutdown ( boolean shutdownOK ) { int rs = runStateOf ( ctl . get ( ) ) ; return rs == RUNNING || ( rs == SHUTDOWN && shutdownOK ) ; }
State check needed by ScheduledThreadPoolExecutor to enable running tasks during shutdown .