private void onRequestFinished() {
      final Item<T> nextRequest;
      synchronized (PriorityStarvingThrottlingProducer.this) {
        nextRequest = mPendingRequests.poll();
        if (nextRequest == null) {
          mNumCurrentRequests--;
        }
      }

      if (nextRequest != null) {
        mExecutor.execute(
            new Runnable() {
              @Override
              public void run() {
                produceResultsInternal(nextRequest);
              }
            });
      }
    }
Time based, priority starving throttling producer.

<p>This means for any # of elements, all of the higher priority items will be run before any of
the lower priority items. Within the groups, send order is the same as order they were given to
the class. (based on nano time).
imagepipeline/src/main/java/com/facebook/imagepipeline/producers/PriorityStarvingThrottlingProducer.java