Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Lets say we have a dependancy map that looks like this -
- a -
- b - a
- c - b
- d - a,c
- e - b
- f - b,c
- g - d
- h - d,f
- i - g,
- j - g
- the corresponding Async map would look like this -
- */
- async.auto({
- a:function(callback){},
- b:["a",function(results,callback){}],
- c:["b"function(results,callback){}],
- d:["a","c",function(results,callback){}],
- e:["b",function(results,callback){}],
- f:["b","c"function(results,callback){}],
- g:["d",function(results,callback){}],
- h:["d","f",function(results,callback){}],
- i:["g",function(results,callback){}],
- j:["g",function(results,callback){}],
- },function(err,results){
- // all done
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement