Giter Site home page Giter Site logo

Comments (3)

jjrv avatar jjrv commented on August 13, 2024

What this does depends on the details. Most likely your function would be like downloadList(list) that returns a promise resolving when everything is done. Then queue.wrap would limit simultaneous downloadList executions. If they internally make sequential downloads, this probably ends up doing what you wanted. If internally they start all downloads at the same time, you'd need to queue.wrap also the recursive call inside downloadList (ideally in a different queue, because the downloadList promise won't resolve until all is done).

from cwait.

jjrv avatar jjrv commented on August 13, 2024

Closing this for now. If you run into some scenario that causes problems, please post it here. I'll reopen the issue and try to fix it.

from cwait.

jjrv avatar jjrv commented on August 13, 2024

Now I probably understood your question. There's a new unblock method and a section in the readme about recursion:

https://github.com/charto/cwait#recursion

Hopefully this answers your question.

from cwait.

Related Issues (9)

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.