Skip to content
masterclass Buddy

Node.js · Class

Worker

Worker runs JavaScript in an independent thread. A parent thread can send messages to it and receive results.

Last updated

Since
v10.5.0

Syntax

new Worker(filename, options?) : Worker

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • worker_threads.isMainThread
  • worker_threads.parentPort
  • worker_threads.workerData
  • worker.postMessage
  • worker.terminate
  • MessageChannel
  • MessagePort
  • worker.resourceLimits

Source: Worker | Node.js 26.13.0 Documentation. Checked 2026-11-03.