public void onNextResult(
        final ForwardingConsumer consumer,
        final @Nullable T closeableObject,
        @Consumer.Status final int status) {
      Iterator<Pair<Consumer<T>, ProducerContext>> iterator;
      final int size;
      synchronized (Multiplexer.this) {
        // check for late callbacks
        if (mForwardingConsumer != consumer) {
          return;
        }

        closeSafely(mLastIntermediateResult);
        mLastIntermediateResult = null;

        iterator = mConsumerContextPairs.iterator();
        size = mConsumerContextPairs.size();
        if (BaseConsumer.isNotLast(status)) {
          mLastIntermediateResult = cloneOrNull(closeableObject);
          mLastStatus = status;
        } else {
          mConsumerContextPairs.clear();
          removeMultiplexer(mKey, this);
        }
      }

      while (iterator.hasNext()) {
        Pair<Consumer<T>, ProducerContext> pair = iterator.next();
        synchronized (pair) {
          if (BaseConsumer.isLast(status)) {
            pair.second
                .getProducerListener()
                .onProducerFinishWithSuccess(pair.second, mProducerName, null);
            if (mMultiplexProducerContext != null) {
              pair.second.putExtras(mMultiplexProducerContext.getExtras());
            }
            pair.second.putExtra(mDedupedRequestsCountKey, size);
          }
          pair.first.onNewResult(closeableObject, status);
        }
      }
    }
Starts next producer if it is not started yet and there is at least one Consumer waiting for
the data. If all consumers are cancelled, then this multiplexer is removed from mRequest map
to clean up.
imagepipeline/src/main/java/com/facebook/imagepipeline/producers/MultiplexProducer.java