APIActive

Node.js Worker threads

Node.js module for spawning threads that run JavaScript in parallel.

Open source page

Field note

What it does

The worker_threads module enables using multiple threads of execution in Node.js, with MessagePort for communication, Worker class for thread management, and BroadcastChannel for pub/sub messaging.

Capabilities

Available capabilities

Tags

Tags

Ways to use it

Ways to use it

sdk

javascript / worker_threads

Product features

Product features

Node.js v26.7.0 documentation

Worker threads #

worker_threads.getEnvironmentData(key) #

worker_threads.isInternalThread #

worker_threads.isMainThread #

worker_threads.isMarkedAsUntransferable(object) #

worker_threads.markAsUncloneable(object) #

worker_threads.markAsUntransferable(object) #

worker_threads.moveMessagePortToContext(port, contextifiedSandbox) #

worker_threads.parentPort #

worker_threads.postMessageToThread(threadId, value[, transferList][, timeout]) #

worker_threads.receiveMessageOnPort(port) #