首页 > 解决方案 > async.js 多线程

问题描述

我想知道 async.js 是否可以使用多核(线程)。源代码表明没有,但也许我只是误解了这个评论:

异步并行:

 * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about
 * parallel execution of code.  If your tasks do not use any timers or perform
 * any I/O, they will actually be executed in series.  Any synchronous setup
 * sections for each task will happen one after the other.  JavaScript remains
 * single-threaded.

有没有办法在多个线程中做到这一点?我有一些处理数据库条目的作业,我需要它们一直在所有内核上运行。

标签: javascriptasynchronous

解决方案


推荐阅读