Function syncToArray

  • Waits for all sources to produce a value, sending the combined results as an array. After sending, it waits again for each source to send at least one value.

    Use syncToObject to output objects based on labelled sources rather than an array of values.

    Pace will be set by the slowest source. Alternatively, use combineLatestToArray where the rate is determined by fastest source.

    Only complete results are sent. For example if source A & B finish and source C is still producing values, synchronisation is not possible because A & B stopped producing values. Thus the stream will terminate after maximumWait (2 seconds). Newer values from C are lost.

    Parameters

    Returns AsyncGenerator<any[]>