Node.js · Middle · Question 6 of 75

A request handler runs a CPU-heavy loop for 2 seconds. What happens to other requests?

Explanation

Move heavy CPU work to worker_threads, a separate service or a job queue, or split it into small chunks with setImmediate between them.

Further reading

Problem with a question

Node.js · Middle · question 6

Test yourself

Take the Node.js · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz