Created
November 19, 2011 13:17
-
-
Save yssk22/1378832 to your computer and use it in GitHub Desktop.
node-mongodb-native について
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
// insertの結果を待たずに実行 | |
col.insert({}, function(){}); // (a) | |
col.insert({}, function(){}); // (b) | |
// async.parallel を使って a, b は非同期で実行するが、 a, b, のりょうほうが終わったら c を呼ぶ | |
async.parallel({ | |
"a": function(cb){ | |
col.insert(..., cb); | |
}, | |
"b": function(cb){ | |
col.insert(..., cb); | |
}, | |
}, function(){ | |
// c | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment