dotnet / reactive

The Reactive Extensions for .NET
http://reactivex.io
MIT License
6.73k stars 751 forks source link

Buffer operator for IAsyncEnumerable<T> #2027

Closed clement911 closed 1 year ago

clement911 commented 1 year ago

Would it be possible to add the Buffer operator for IAsyncEnumerable<T>?

It's already available for Rx.NET and Ix.Net so I think it would make sense to add for LINQ for IAsyncEnumerable as well.

theodorzoulias commented 1 year ago

https://github.com/dotnet/reactive/blob/main/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Buffer.cs

public static IAsyncEnumerable<IList<TSource>> Buffer<TSource>(
    this IAsyncEnumerable<TSource> source, int count);
clement911 commented 1 year ago

Thanks @theodorzoulias.

What happened is that I had added System.Linq.Async but not System.Interactive.Async.

I am quite confused as to why there are 2 separate packages.

Is there a summary of all linq/interactive/reactive packages and how they differ and relate to each other.

I had taken a look at https://github.com/dotnet/reactive#reactive-extensions which mentions only System.Reactive, System.Reactive.Async, System.Interactive and System.Linq.Async. Since System.Interactive.Async is not mentioned, I was not aware of it. Maybe a quick summary in the README would be helpful.

HowardvanRooijen commented 1 year ago

@idg10 - we may need to create another issue about this, plus it could feed into the discussions with @davidfowl about Ix and the BCL.