boolean run(Logger log, Throwable exceptionToDeliver) {
            if (exceptionToDeliver == null) {
                try {
                    event.run();
                } catch (InterruptedException e) {
                    log.warn("Interrupted while running event. Shutting down event queue");
                    return true;
                } catch (Throwable e) {
                    log.debug("Got exception while running {}. Invoking handleException.", event, e);
                    exceptionToDeliver = e;
                }
            }
            if (exceptionToDeliver != null) {
                completeWithException(log, exceptionToDeliver);
            }
            return Thread.currentThread().isInterrupted();
        }
Run the event associated with this EventContext.

@param log                  The logger to use.
@param exceptionToDeliver   If non-null, the exception to deliver to the event.

@return                     True if the thread was interrupted; false otherwise.
server-common/src/main/java/org/apache/kafka/queue/KafkaEventQueue.java