Concurrent JavaScript — Part II: Input/Output
Abdullah Ali
392

If you use cluster.fork() to spawn new processes instead of using the main process you will be able to solve the same problem without the use of threads. Threads needs a lot of considerations and I think most problems can be better handled with an actor model and cluster instead of introducing threads.

The following code runs on 1.156s on my Macbook Pro:
https://gist.github.com/irony/d44cbda0c71707e89274edd63fcc3d35

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.