Skip to content
Effect 4.0 is here. One ecosystem. Zero dependencies.

NodeWorkerRunner unstable

Node.js runtime support for workers that serve Effect worker requests.

NodeWorkerRunner supplies the Node implementation of the Effect worker runner platform. The exported layer runs inside a node:worker_threads worker through parentPort, or inside a child process through process.send. It listens for parent messages, runs handlers registered with WorkerRunner, sends replies over the same channel, and closes when the parent sends the close message.

1 exports Since v4.0.0 Source

Layers

layer

unstable
Since v4.0.0

Provides the WorkerRunnerPlatform for code running inside a Node worker thread or child process, routing parent messages to the registered handler and sending responses back through the parent channel.

Signature

declare const layer: Layer.Layer<WorkerRunner.WorkerRunnerPlatform>