LeeCampbell / RxCookbook

Collection of recipes and snippets helping you create useful Rx code
280 stars 39 forks source link

Create Buffer that doesn't yield empty buffers #27

Open LeeCampbell opened 8 years ago

LeeCampbell commented 8 years ago

As this post requests http://stackoverflow.com/questions/35606136/rx-buffer-without-empty-calls-to-subscriber/35616332#35616332, he would like to have a buffer run at 50ms. However when no values are found during the window, he doesn't want a buffer to be yielded. He could use .Where(buffer=>buffer.Any()) but this doesn't help with the GC pressure he may incur.

Can we build a low allocation version of Buffer?

LeeCampbell commented 7 years ago

I worked with @epsitec on an implementation of this. I should be able to lean on that example. http://share.linqpad.net/ekvedh.linq

ivasilyeu commented 3 years ago

Any updates on this issue?