Skip to content

WorkerPoolComponentConstructorParams<TApi>

Parameters of WorkerPoolComponent.

Import:

import type { WorkerPoolComponentConstructorParams } from '@mnaoumov/obsidian-lib/components/worker-pool-component';

Signature:

export interface WorkerPoolComponentConstructorParams<TApi extends WorkerApi<TApi>>

Properties

PropertyTypeDescription
fallbackHandlers?WorkerApiHandlers<TApi>The handlers to run on the main thread when no Worker can be created. See WorkerComponent.
name?stringThe workers' name prefix, shown by the developer tools; each worker gets <name> <index>.
size?numberThe number of workers. Defaults to getDefaultWorkerPoolSize.
sourcestringThe bundled worker source.