Comments (3)
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.
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.
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)
- Does not appear to work with vanilla Promises HOT 1
- Queue doesn't process in order? HOT 1
- Just for historical interest: sendValue HOT 2
- Using with vanilla Promises HOT 2
- Add task to empty queue HOT 4
- Usage with vanilla Promise.all HOT 2
- Change concurrency level after initialization HOT 1
- Better typing for TaskQueue.wrap() HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cwait.