CompoundParallelTupleIter
creates one TupleIter out of several. Unlike its serial counterpart {@link CompoundTupleIter}, it runs all its inputs in parallel, in separate threads that it spawns. It outputs the next element available from any of its inputs. Note that the order of output rows is indeterminate, since it is unpredictable which input will arrive next. The compound TupleIter is finished when all of its inputs are finished. The set of input iterators is fixed at construction.
This variant is needed when an input is infinite, since CompoundTupleIter would hang. Extending this class to preserve order is problematic, given its low level:
|
|