Skip to content

getDefaultWorkerPoolSize

Suggests a pool size: one fewer than the logical processors, so the main thread keeps one, between 1 and MAX_DEFAULT_WORKER_POOL_SIZE.

Import:

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

Signature:

function getDefaultWorkerPoolSize(hardwareConcurrency: number | undefined): number

Parameters:

Parameter Type Description
hardwareConcurrency number | undefined The number of logical processors. Defaults to navigator.hardwareConcurrency.

Returns: number — The suggested size.


Links to this page: