Typography

活版印字


  • Home
  • Archive
  • Categories
  • Tags
  •  

© 2020 alincode

Theme Typography by Makito

Proudly published with Hexo

Promise map 並發

Posted at 2016-08-16 bluebird concurrency Promise 

如果控制非同步並發,可以設定 concurrency 參數。

1
2
3
4
5
6
7
async function syncSomething(datas) {
return Promise.map(datas, async(data) => {
return data;
}, {
concurrency: 1
});
}

Promise.map

Share 

 Previous post: 自動部署三兩事(2) - 客製化 Task Next post: 更新 geoip lite module 的 IP 對應表 

© 2020 alincode

Theme Typography by Makito

Proudly published with Hexo