Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
An IteratorQueue is equivalent to an IteratorChain with the difference that the iterators to use are put into a queue instead of an list, and that they are removed from the queue if an iterator is exhausted.
The IteratorChain keeps the iterators in the list even if they are exhausted, thus they can not be gc'ed until the whole chain is done. The interface of IteratorChain also contains a getIterators method, which returns the list of iterators used by this chain. So instead of changing the IteratorChain, I propose to add a separate class IteratorQueue with the described behavior.