【发布时间】:2016-07-05 00:25:24
【问题描述】:
我有这样的异步代码
async.eachLimit(teams, 1000, fetchTeamInfo, exit)
我需要将其转换为 Promise (bluebird)
我认为制作这样的东西会很好:
Promise.method (teams, 1000, fetchTeamInfo) ->
async.parallelLimit arr.map((a, i) ->
->
iterator a, i, arr
), limit
但不确定是否正确
【问题讨论】:
标签: javascript node.js asynchronous coffeescript promise