Friday 29 March 2019

Can I use child processes to improve a simple loop loop?

for (let i = 0; i <= 1000000000; i++) { if (i === 1000000000) { console.log("The number is: ", i); process.exit(); } } The number is arbitrary and just there as an example. Just imagine that the loop can take minutes to complete.

Submitted March 29, 2019 at 04:03PM by spider_milk

No comments:

Post a Comment