GithubHelp home page GithubHelp logo

Comments (5)

kind-serge avatar kind-serge commented on August 25, 2024

what is it supposed to do?

from asyncenumerable.

otabekgb avatar otabekgb commented on August 25, 2024

With it you can order the sequence. Sync version is IOrderedEnumerable

from asyncenumerable.

kind-serge avatar kind-serge commented on August 25, 2024

An IAsyncEnumerable should be used for streaming, not sure how IOrderedEnumerable can be applicable here - the source collection should not be stored in memory.
Do you have any specific use case?

from asyncenumerable.

ndrwrbgs avatar ndrwrbgs commented on August 25, 2024

@TYROTOXIN It's possible in a streaming context - similar to IQbservable - where it is really the remote that is doing the sorting and it's just a signal to the consumer that it IS sorted, but no code in a library would ever be making a OrderedAsyncEnumerable directly.

To explain that better, a client would call a StreamSortedFromRemote(). The remote would create an IOrderedEnumerable, but then stream that back to the client (probably in batches). In this way, there's no concrete implementation of the OrderedAsyncEnumerable, but the interface does allow for some assumptions made in e.g. extension methods.

That said, I'm not sure what scenario this would enable that couldn't be accomplished by the calling code just assuming that the collection is ordered. The scenarios I can think of seem to be suited for

  • Task<IOrderedEnumerable>
  • IAsyncEnumerable
  • Quite specific to a particular scenario making it probably best to just make that 'assumption' of sorted in the client code.

@otabekgb could you explain the scenario you'd need this for, for better musing about the solutions?

from asyncenumerable.

kind-serge avatar kind-serge commented on August 25, 2024

@otabekgb, I'm closing the suggestion due to lack of the input. Feel free to open if you have a concrete scenario.

from asyncenumerable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.