I have two sequences IObservablethat will return no more than one element before completion. I want to combine them, but while the first sequence, as a rule, ends with the first, in rare cases it can end with a second. If it ends second, I want to ignore its conclusion.
Normal case:
A 1
B - 2
Result 1 2
Rare, "slow A" case:
A - 1
B 2
Result 2
Is there an easy way to do this? I do not know how to prematurely complete the combined sequence, on the basis of which the IObservablelatter was called OnNext. The best solution I have is to Selectreturn a Tuple, indicating from which sequence the value was obtained, and simply ignore everything after the result of "B".
source
share