Created
July 10, 2013 05:49
-
-
Save soomtong/5963755 to your computer and use it in GitHub Desktop.
패러랠 패턴
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
// async 모듈 사용시 형태 | |
exports.getList = function (req, res) { | |
async.parallel([ | |
// 메소드 1 | |
// 메소드 2 | |
// 메소드 3 | |
], function (args) { // 반드시 필요한 콜백 | |
//bind view page | |
res.render(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
순차적으로 실행하지 않아도 된다면 콜백내에서 콜백실행 갯수를 확인해서 할 수도 있고
아래처럼 재귀로 돌리면서 해도 됩니다.