Nondeterministically merges a stream of streams (outer
) in to a single stream,
opening at most maxOpen
streams at any point in time.
Nondeterministically merges a stream of streams (outer
) in to a single stream,
opening at most maxOpen
streams at any point in time.
The outer stream is evaluated and each resulting inner stream is run concurrently,
up to maxOpen
stream. Once this limit is reached, evaluation of the outer stream
is paused until one or more inner streams finish evaluating.
When the outer stream stops gracefully, all inner streams continue to run, resulting in a stream that will stop when all inner streams finish their evaluation.
When the outer stream fails, evaluation of all inner streams is interrupted and the resulting stream will fail with same failure.
When any of the inner streams fail, then the outer stream and all other inner streams are interrupted, resulting in stream that fails with the error of the stream that cased initial failure.
Finalizers on each inner stream are run at the end of the inner stream, concurrently with other stream computations.
Finalizers on the outer stream are run after all inner streams have been pulled from the outer stream -- hence, finalizers on the outer stream will likely run before the last finalizer on the last inner stream.
Finalizers on the returned stream are run after the outer stream has finished and all open inner streams have finished.
Maximum number of open inner streams at any time. Must be > 0.
Stream of streams to join.