Giter Site home page Giter Site logo

Comments (4)

freak4pc avatar freak4pc commented on July 20, 2024

I'm not opposed to simply pulling DemandBuffer from CombineExt into the project to deal with back pressure but I have to say that limiting demand for UI events is a highly unlikely use case. Do you have such a practical use case or are you more interested in the technical completeness ?

Thanks

from combinecocoa.

gahntpo avatar gahntpo commented on July 20, 2024

If I have a subscriber with a request that is not unlimited, it is simply ignored. The use case would be starting fetches
flatmap(maxPublisher: .max(2) ) { url in URLSession.default.dataTaskPublisher(for url:) }
the maxPublisher allows me to decide how many network requests I want to do concurrently. once the flatmap is finished with one network request, it will send a new demand to its publisher. and receive the new value. This helps me to do batch requests with flatmap. I can also set max(1) to do my network requests in serial. But for this to work properly the upstream publisher needs to fulfill the demand handling.

from combinecocoa.

freak4pc avatar freak4pc commented on July 20, 2024

Thanks, I think you misunderstood what I'm asking.
I'm asking what is the use case for back pressuring UI events (like ControlEvent/ControlTarget publishers) ?

flatMap itself still respects back pressure so using the format you mentioned here shouldn't be affected by CombineCocoa to the best of my understanding.

from combinecocoa.

freak4pc avatar freak4pc commented on July 20, 2024

Closing for now. If you have additional details / context on this please let me know and I can reopen. Thank you! :)

from combinecocoa.

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.