Skip to content

WorkerOptions

[<Interface>]
type WorkerOptions =
    abstract member argv: obj array option with get, set
    abstract member env: U2<Symbol,Record<string,string option>> option with get, set
    abstract member eval: bool option with get, set
    abstract member execArgv: string array option with get, set
    abstract member name: string option with get, set
    abstract member resourceLimits: ResourceLimits option with get, set
    abstract member stderr: bool option with get, set
    abstract member stdin: bool option with get, set
    abstract member stdout: bool option with get, set
    abstract member trackUnmanagedFds: bool option with get, set
    abstract member transferList: Transferable array option with get, set
    abstract member workerData: obj option with get, set
    static member Create (?argv: obj array, ?env: U2<Symbol,Record<string,string option>>, ?eval: bool, ?workerData: obj, ?stdin: bool, ?stdout: bool, ?stderr: bool, ?execArgv: string array, ?resourceLimits: ResourceLimits, ?transferList: Transferable array, ?trackUnmanagedFds: bool, ?name: string) : WorkerOptions
AssemblyXantham.Fable.Node
Attributes[<Interface>]

Properties

abstract member argv: obj array option with get, set

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.

abstract member env: U2<Symbol,Record<string,string option>> option with get, set
abstract member eval: bool option with get, set
abstract member execArgv: string array option with get, set
abstract member name: string option with get, set

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

abstract member resourceLimits: ResourceLimits option with get, set
abstract member stderr: bool option with get, set
abstract member stdin: bool option with get, set
abstract member stdout: bool option with get, set
abstract member trackUnmanagedFds: bool option with get, set
abstract member transferList: Transferable array option with get, set

Additional data to send in the first worker message.

abstract member workerData: obj option with get, set

Methods

static member Create (?argv: obj array, ?env: U2<Symbol,Record<string,string option>>, ?eval: bool, ?workerData: obj, ?stdin: bool, ?stdout: bool, ?stderr: bool, ?execArgv: string array, ?resourceLimits: ResourceLimits, ?transferList: Transferable array, ?trackUnmanagedFds: bool, ?name: string) : WorkerOptions