Created
June 17, 2014 08:45
-
-
Save youxiachai/0fb3c7cd743d836d5070 to your computer and use it in GitHub Desktop.
嵌套async练习
This file contains hidden or 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'); | |
async.eachSeries(['2m内容'], function (item, callback) { | |
async.parallel([ | |
function (subcallback) { | |
//1 | |
}, | |
function (subcallback){ | |
//2 | |
} | |
], function (err, subResult) { | |
async.eachSeries(['再循环N次'], function (s2item, s2callback){ | |
s2callback() | |
}, function (err){ | |
async.parallel([ | |
function (subcallback) { | |
//1 再战N个 | |
} | |
], function (err){ | |
//这条数据任务的完成标识 | |
callback() | |
}) | |
}) | |
}) | |
}, function (err){ | |
console.log(err); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment