You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.x: combineLatest can now combine arbitrary number of sources
This PR is a backport of the 2.x `combineLatest` with `null` support and
let's the programmer combine more than 128 sources at once.
The original had this 128 limit due to using a single and non-parametric
RxRingBuffer to store values from sources. In addition, the original
algorithm divided downstream requests among the sources with some
strange logic in order to keep them running and not overflow the buffer.
This PR uses an unbounded SPSC queue which can now hold as many elements
as there are sources times the default ring buffer size (this is not
preallocated and grows/shrinks as necessary).
The algorithm stores the current latest array and the source subscriber
in the queue in pairs so when that particular row is emitted to
downstream, that source subscriber gets the request() replenishment call
that generated the row.
0 commit comments