I have a Rx Observable that acts as a buffer. Right now it performs the method in Subscribe either when it gets 10 items, or after 100 milliseconds, whichever comes first.>
Perhaps try it like this:
public MyBufferClass(IMyServer server, IScheduler scheduler)
{
this.serverRequests = new Subject>>();
this.serverRequests
.GroupByUntil(x => 1, x => Observable.Timer(TimeSpan.FromMilliseconds(1000)))
.SelectMany(x => x.ToArray())
.Subscribe(buffer => GetMultipleItemsFromServer(buffer));
}
That doesn't give you empty results.
And the answer to your question regarding .Buffer(...)
- that's the way it has been designed. Nothing more complicated than that.