Last active
December 17, 2015 00:59
-
-
Save emadb/5525652 to your computer and use it in GitHub Desktop.
Come cacchio funziona!! Perchè complete non viene mai eseguito??
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var async = require('async'); | |
var functions = []; | |
functions.push(function(){ console.log("1"); return test1(1); }); | |
functions.push(function(){ console.log("2"); return test1(2); }); | |
functions.push(function(){ console.log("3"); return test1(3); }); | |
async.parallel(functions, function(err, result){ | |
console.log('complete', result); | |
}); | |
function test1 (value){ | |
return "hello " + value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
my 2c: passa la callback che va invocata dalle tue funzioni parallele: