DEV Community


Discussion on: How to Manage Multiple Threads in Node JS

johnjardincodes profile image
💻 JOHN JARDIN | Bleeding Code Author

Always a pleasure. Most of the time it's going to come to advanced business logic that needs to perform a series of processes on returned data from DB or 3rd party queries, etc.

What you always want to be doing is keeping the primary thread and event loop spinning as fast as it can and processing those incoming requests. The moment you have tasks that contain synchronous logic that cause even the slightest of delays, hand it over to Worker Pool 👍.