Nezir Zahirovic
Nezir Zahirovic

Going Multithread with Node.js - ITNEXT

Node.js has been criticized a lot because of it design.Coming from programming languages such as Java, C or Python, it seems strange that Node.js doesn’t have a direct access to threads. How do we run things concurrently?Well, before Node.js 11 we could actually run concurrent/parallel code using the cluster module, as seen in this previous article.But if we’re on a server that only have one core, how can we do?In Node.js 11 we have the worker_thread module which allows us to spawn multiple threads on a single core. We could actually have used this module in Node.js 10 with the --experimental-worker flag, but with Node.js 11 we can finally avoid it!.


Going Multithread with Node.js - ITNEXT #javascriptba #javascript #nodejs #reactjs #angularjs #vuejs #meteorjs #typecscript #jquery #emberjs #bosnia