I am following the async module's each method (https://github.com/caolan/async#each). It says the method iterates over the array parallely. "Parallely" is the word that confuses me. AFAIK, in now way JavaScript can execute code parallely because it has a single-threaded model.
The examples shown in the each method focuses on the IO scenarios. I am using the "each" method just to add numbers of the array. If parallelism exists, can I prove this using my example?
Thanks for reading.
parallelin terms of concurrency, butparallelin terms of independent from each other (see eachSeries for a version which processes each item after the other). For I/O, it makes sense; for calculations, it doesn't.asynchronously, because that is what it actually does. The idea of "parallelism" conveys the meaning of operations that can overlap in time. Thisparallelfunction only guarantees that its function arguments will be invoked asynchronously.