How to activate two JavaScript functions in parallel?

前端 未结 7 852
失恋的感觉
失恋的感觉 2020-12-16 02:23

Anyone can tell me how to activate two (or more) JavaScript AJAX functions in parallel?

7条回答
  •  星月不相逢
    2020-12-16 02:46

    use Web Workers to run tasks in Parallel

    You can a tutorial here: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers

    Also, this library, which takes advantage of web workers, came up pretty fast on google: https://parallel.js.org/

提交回复
热议问题