code: public void notifyListeners(final Event<?> event) {
          /*
           * a temporary array buffer, used as a snapshot of the state of
           * current listeners.
           */
          AbstractEventListener<?>[] arrLocal = null;
  
          synchronized (this) {
              /* We don't want the listener doing callbacks into arbitrary code
               * while holding its own Monitor. The code where we extract each
               * Observable from the Vector and store the state of the listener
               * needs synchronization, but notifying listeners does not (should not).
               * The worst result of any potential race-condition here is that:
               * 1) a newly-added listener will miss a notification in progress
               * 2) a recently unregistered listener will be wrongly notified
               *    when it doesn't care
               */
              if (!changed) {
                  return;
              }
  
              final String eventType = event.getType();
              final List<AbstractEventListener<?>> listenerList = listeners.get(eventType);
  
              final AbstractEventListener<?>[] types = new AbstractEventListener<?>[1];
  
              if (null != listenerList && !listenerList.isEmpty()) {
                  arrLocal = listenerList.toArray(types);
                  clearChanged();
              }
          }
  
          if (null != arrLocal) {
              for (int i = arrLocal.length - 1; i >= 0; i--) {
                  arrLocal[i].performAction(this, event);
              }
          }
      }
docs: Notifies all listeners of this event queue to perform action.
  <p>
  If this event queue object has changed, as indicated by the
  {@code hasChanged} method, then notify all of its listeners and then
  call the {@code clearChanged} method to indicate that this object has
  no longer changed.
  
  @param event the specified event
  @see AbstractEventListener#performAction(org.b3log.latke.event.AbstractEventQueue, org.b3log.latke.event.Event)