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
function called twise in 'auto' mode #128
Comments
Same problem, but seems to work fine in 0.1.15 |
Same problem here! |
Ran into this too. Happens when one or more of the callbacks are not truly asynchronous. Like, in your example, task3. Fix is to not allow tasks to be run more than once. See #134 |
I'm using async 0.1.22 with @allanca's patch and I am still seeing this problem. To reproduce: async.auto({
a: function(next) {
console.log("a");
setTimeout(function() {
next();
}, 0);
},
b: ["a", function(next) {
console.log("b");
}
],
c: ["a", function(next) {
console.log("c");
next();
}
]
}); What's happening is, |
+1 for dpatti's fix. I've seen this issue too in 0.1.22. It occurs when t2 and t3 both depend on t1, and t1 doesn't complete immediately. Because the current test (to determine if a task is ready to execute) is looking at the "results" object, and t1 hasn't finished, both t2 and t3 can start a version of t1. dpatti's fix solves this issue. |
Patched in 0.2.0. |
Let's say we have 3 functions: 2 and 3 depend on 1 (example).
In this case function 2 called twice.
Am I missing something?
output
The text was updated successfully, but these errors were encountered: