public boolean isRunning() {
        return !isShutdownInitiated();
    }
This method is repeatedly invoked until the thread shuts down or this method throws an exception
server-common/src/main/java/org/apache/kafka/server/util/ShutdownableThread.java