I have a solution for receiving Observable notifications until specified count arrived or time threshold elapsed. Also, I need to know which one happened.
Wondering if there is a simpler way (maybe other than GroupByUntil) to achieve this functionality
_values. .GroupByUntil(_ => true, i => Observable.Timer(Threshold, _scheduler) .Amb(i.Buffer(SpecifiedCount).Select(_ => SpecifiedCount))) // this is for figuring out which one happened: interval elapsed or count filled .SelectMany(g => g.Count()) // Let's say if count filled first, call Foo() .Where( i => i == SpecifiedCount ) .Subscribe( _ => Foo() )
GroupByUntilsolution. Trying to figure out why.Observables, I now believe the differing functionality comes from my test environment and/or misusage ofTestScheduler. I will close this question