NodeWorkerRunner.ts
NodeWorkerRunner.ts overview
Section titled “NodeWorkerRunner.ts overview”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.
Since v4.0.0
Exports Grouped by Category
Section titled “Exports Grouped by Category”layers
Section titled “layers”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, never, never>Since v4.0.0