( Using the Zip operator in Reactive Extensions (Rx) )
Combining Stream Pairs into One without Timeout
var xyZipped = xStream.Zip(yStream, (x, y) =>
{
Debug.WriteLine("Latest Pair Has Arrived");
return new List<SomeType> { x, y };
});
But how could you introduce a maximum allowed time interval between the two values in each stream, so that if the inter-value interval is exceeded then no value would be output from
xyZipped
And if too long passes between the two values then pairing should be reset as well i.e. for another pairing to occur after a timeout a new value should be produced in each of the streams (not just one).
Or would it be better to use a different operator / implementation to achieve this kind of stream logic?