[tf.data] Add comment to ShouldWait for the nondeterministic case to explain the condition it's checking for
PiperOrigin-RevId: 311032271 Change-Id: Ib83e68934898d22b810332a71e5efe142e62e139
This commit is contained in:
parent
775d6b6497
commit
9f7d843e3f
@ -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() &&
|
||||
|
Loading…
Reference in New Issue
Block a user