Worker Threads

noun

say it: “WUR-ker THREDZ” /ˈwɝkər ˈθrɛdz/

Node's way of running heavy JavaScript on separate threads, so a long calculation doesn't block other requests.

What is Worker Threads?

Worker threads run CPU-heavy JavaScript on separate threads, so it doesn't block the event loop.

In a sentence

  • “Worker threads help with heavy calculations, not with waiting on the database.”
  • “Resizing photos moved to worker threads, so the API stays quick while it works.”

Level: Freelancer · More Node.js terms at this level

Updated