public class ContextAwareIterator<T>
:: DeveloperApi ::
A TaskContext aware iterator.
As the Python evaluation consumes the parent iterator in a separate thread,
it could consume more data from the parent even after the task ends and the parent is closed.
If an off-heap access exists in the parent iterator, it could cause segmentation fault
which crashes the executor.
Thus, we should use ContextAwareIterator to stop consuming after the task ends.
Nested Class Summary
Nested classes/interfaces inherited from interface scala.collection.Iterator