Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parallelLimit throws RangeError #573

Closed
skerit opened this issue Jul 7, 2014 · 1 comment
Closed

parallelLimit throws RangeError #573

skerit opened this issue Jul 7, 2014 · 1 comment

Comments

@skerit
Copy link

skerit commented Jul 7, 2014

When I execute my tasks using parallelLimit I get a RangeError: Maximum call stack size exceeded. Here's the code:

Object.each(item[model.modelName], function(value, fieldKey) {

    var field = model.getModelEditorField(fieldKey);

    itemTasks[fieldKey] = function(next_task) {

        field.prepareExport(value, function(err, result) {
            next_task(err, result);
        });
    };

});

async.parallelLimit(itemTasks, 3, function(err, result) {
    next(err, result);
});

When I execute the tasks using the regular .parallel method it works without problems.

@aearly
Copy link
Collaborator

aearly commented Jul 7, 2014

is field.prepareExport asynchronous? Does it callback on the same process tick?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants