forkJoinList<T> static method

Stream<List<T>> forkJoinList<T>(
  1. Iterable<Stream<T>> streams
)

Merges the given Streams into a single Stream that emits a List of the last values emitted by the source stream(s). This is helpful when you need to forkJoin a dynamic number of Streams.

If the provided streams is empty, the resulting sequence completes immediately without emitting any items.

Example

Rx.forkJoinList([
  Stream.value(1),
  Stream.fromIterable([0, 1, 2]),
])
.listen(print); // prints [1, 2]

Implementation

static Stream<List<T>> forkJoinList<T>(Iterable<Stream<T>> streams) =>
    ForkJoinStream.list<T>(streams);