async的使用需要安装第三方包

1.串行无关联 async.series

函数依次执行,后面不需要调前面步骤的结果

程序执行时间为所有步骤之和

Node.js异步库async

2.并行无关联  async.paraller

某步出错不影响其他步骤执行

程序执行时间为最长的那个时间

Node.js异步库async

3.串行有关联  async.waterfall

函数依次执行,后面需要调前面步骤的结果

程序执行时间为所有步骤之和

Node.js异步库async

 

相关文章:

  • 2020-01-11
  • 2021-05-10
  • 2021-07-18
  • 2022-01-22
  • 2022-12-23
  • 2021-09-26
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案