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
Which library version?
Bug occurs with 5.0 and 6.0
What is the use case or problem?
We have a continuous stream of data that we want to process in chunks. To archive this we a buffer that we can flush if needed.
public static IObservable<IList<TSource>> FlushableBuffer<TSource>(this IObservable<TSource> source, int max, ISubject<Unit> manualFlushSignal)
{
var bufferOverFlowFlushSignal = source.Skip(max - 1)
.Select(_ => Unit.Default);
var mergedSignals = manualFlushSignal.Merge(bufferOverFlowFlushSignal);
return source.Buffer(() => mergedSignals);
}
This behavior works fine for BehaviorSubject and Subject but with ReplaySubject we get an infinite loop when the buffer is full.
This behavior works fine for
BehaviorSubject
andSubject
but withReplaySubject
we get an infinite loop when the buffer is full.I wrote some tests to illustrate this issue:
ReactiveReplaySubjectFlushableBuffer.zip
Best Regards
Simon
The text was updated successfully, but these errors were encountered: