code: @Override
  	public boolean publish(ResultPartitionID partitionId, TaskEvent event) {
  		checkNotNull(partitionId);
  		checkNotNull(event);
  
  		TaskEventHandler taskEventHandler;
  		synchronized (registeredHandlers) {
  			taskEventHandler = registeredHandlers.get(partitionId);
  		}
  
  		if (taskEventHandler != null) {
  			taskEventHandler.publish(event);
  			return true;
  		}
  
  		return false;
  	}
docs: Publishes the event to the registered {@link EventListener} instances.
  
  <p>This method is either called directly from a {@link LocalInputChannel} or the network I/O
  thread on behalf of a {@link RemoteInputChannel}.
  
  @return whether the event was published to a registered event handler (initiated via {@link
  #registerPartition(ResultPartitionID)}) or not