message: [tf.data] Add comment to ShouldWait for the nondeterministic case to explain the condition it's checking for
diff: @@ -621,6 +621,11 @@ class ParallelMapIterator : public DatasetBaseIterator {
  return false;
  }
  if (!deterministic_) {
  + // Iterate through in-flight results and returns the first one that is
  + // found to be available and not end-of-input. If the first result (in
  + // order) is end-of-input, we know that all earlier iterations have
  + // already been completed, so it is safe to return that result for the
  + // caller to process end of iteration.
  for (auto it = invocation_results_.begin();
  it != invocation_results_.end(); ++it) {
  if ((*it)->notification.HasBeenNotified() &&
  