Skip to main content

Interface: WorkerOptions

Defined in: core/src/threads/ThreadPool.ts:25

Describes the various options that can be used when creating worker threads.

Properties

allowTs?

optional allowTs?: boolean

Defined in: core/src/threads/ThreadPool.ts:33

Set to true to enable support for importing TypeScript modules in the worker. Default is true.


args?

optional args?: any

Defined in: core/src/threads/ThreadPool.ts:27

The list of initialization arguments to pass into the worker thread.


entry?

optional entry?: string

Defined in: core/src/threads/ThreadPool.ts:29

The path to the entry file create a worker thread from. Default is ThreadWorkerEntry.js.


restartOnExit?

optional restartOnExit?: boolean

Defined in: core/src/threads/ThreadPool.ts:31

Indicates if a worker thread should automatically be restarted on exit.


worker?

optional worker?: string

Defined in: core/src/threads/ThreadPool.ts:35

The path to the worker file. This must be set when using ThreadWorkerEntry as the default entry file.