WorkerOptions - Node documentation
interface WorkerOptions

Usage in Deno

import { type WorkerOptions } from "node:worker_threads";

Properties

optional
argv: any[] | undefined

List of arguments which would be stringified and appended to process.argv in the worker. This is mostly similar to the workerData but the values will be available on the global process.argv as if they were passed as CLI options to the script.

optional
env:
Dict<string>
| SHARE_ENV
| undefined
optional
eval: boolean | undefined
optional
workerData: any
optional
stdin: boolean | undefined
optional
stdout: boolean | undefined
optional
stderr: boolean | undefined
optional
execArgv: string[] | undefined
optional
resourceLimits: ResourceLimits | undefined
optional
transferList: TransferListItem[] | undefined

Additional data to send in the first worker message.

optional
trackUnmanagedFds: boolean | undefined
optional
name: string | undefined

An optional name to be appended to the worker title for debuggin/identification purposes, making the final title as [worker ${id}] ${name}.