|
|
|
|
|
by moglito
1229 days ago
|
|
But there is no concurrency in Javascript! So even after this exercise, the running function still has to finish before the next can start. This will only create actual concurrency when each of the actors are themselves doing pretty IO heavy things where they wait for external processes to finish. Otherwise, if you actually have compute heavy processes that should run in parallel you should use the node.js cluster package or worker threads, both of which come with IPC built in already. |
|
Javascript has concurrency (which async/await and promises are).
It doesn’t have parallelism at the language level (but see, e.g., the Web Workers API).