RangeError when using queue with 5000+ tasks.
See original GitHub issueI have made a pull request with a test that fails. https://github.com/caolan/async/pull/509
RangeError Maximum call stack size exceeded
It is basicaly this
var q = async.queue(function(task,cb) { cb(); })
q.pause();
for (var i=0; i< 5000; i++) {
q.push({ index: i });
}
q.resume();
When cb is called there can be RangeError’s I don’t know enough to figure out why though.
Issue Analytics
- State:
- Created 9 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
nodeJs huge array processing throws RangeError: Maximum ...
The problem is that you are making to many function calls. Setting the stack-size to a higher value will only increase the number...
Read more >JavaScript RangeError: Maximum Call Stack Size Exceeded
The RangeError: Maximum call stack size exceeded is thrown when a function call is made that exceeds the call stack size. This can...
Read more >A mostly complete guide to error handling in JavaScript.
Learn how to deal with errors and exceptions in synchronous and asynchronous JavaScript code.
Read more >The Stack in Magic and JavaScript | by Pascal van Leeuwen
In computing, it is a data structure where data and tasks are ... it is pushed to the callback queue and will resolve...
Read more >xrtlibrary-async - npm
Start using xrtlibrary-async in your project by running `npm i ... strictMode (Boolean): True if a task function must return with a Promise...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You need to call
cb()
asynchronously. TrysetImmediate(cb)
instead.Btw, Frame.js v2 resolved this issue. https://github.com/bishopZ/Frame.js