presto-main/src/main/java/io/prestosql/execution/StateMachine.java/StateMachine/safeExecute
class StateMachine:    private void safeExecute(Runnable command)
    {
        try {
            executor.execute(command);
        }
        catch (RejectedExecutionException e) {
            if ((executor instanceof ExecutorService) && ((ExecutorService) executor).isShutdown()) {
                throw new PrestoException(SERVER_SHUTTING_DOWN, "Server is shutting down", e);
            }
            throw e;
        }
    }