-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Whither System.Linq.AsyncEnumerable? #29145
Comments
/cc @terrajobst |
I'm looking for the pull model of enumerable, not the push model of reactive. My own attempt is https://github.com/Damien-The-Unbeliever/Linq.AsyncEnumerable |
That's exactly what the System.Linq.Async package offers, since it uses |
|
Yeah, I see it now. Thanks |
If I have a IAsyncEnumerable that contains 20 elements, each element takes 1 seconds to get, and if I just want to get the last element, then it takes 20 seconds for me to use Last()? This is crazy! I wish I could use IEnumerable so that I could quickly enumerate the elements and then manually await it, but the asynchronous data source forced me to use The IAsyncEnumerable. |
@CodingNinjaOctocat That sounds like you want |
You're right, I test it over and over again, IEnumerable<Task> is the best choice. |
#111685 has added System.Linq.AsyncEnumerable. |
IEnumerable has a companion class - System.Linq.Enumerable - that provides LINQ to Objects implementation.
IAsyncEnumerable doesn't seem to have such a companion. Is this a deliberate decision? I can't find any discussion on this but I may be searching wrong.
In the meantime, I've spent a couple of weekends trying to build my own. It doesn't seem undoable but perhaps there's a reason it's undesirable?
(It is, however, undoubtedly tedious to produce all of the overloads)
The text was updated successfully, but these errors were encountered: