How does Node.js handle the child threads?

In general, Node.js is a single-threaded process and doesn’t expose the child threads or thread management methods.

But you can still make use of the child threads using spawn() for some specific asynchronous I/O tasks that execute in the background and don’t usually execute any JS code or hinder the main event loop in the application. 

If you still want to use the threading concept in your application you have to include a module called ChildProcess explicitly.

Comments

Popular posts from this blog

What test framework did you use to test your nodejs applications

What is V8 Engine? What is the relationship between Node.js and V8?