â» async.js ãå«ããªè¨³ã§ã¯ããã¾ãããä»ã¾ã§ãä¸è©±ã«ãªã£ã¦ãã¾ããã Node.js v0.12 ãã Promise ãæ¨æºã§ä½¿ããããã«ãªã£ãã®ã§ async.js ã® parallel ã series ã§è¡ã£ã¦ãããã¨ã Promise ã§å®ç¾ãããï¼ã¨ãã趣æ¨ã§ãã parallel (並åå®è¡) var count = 0; function echo() { var cnt = count++; return new Promise(function (resolve, reject) { setTimeout(function () { console.log(cnt); resolve(cnt); }, Math.random() * 1000); }); } var promises = [echo(), echo(), echo()]; Promise.al
{{#tags}}- {{label}}
{{/tags}}