Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
throw new Error('Trying to get a worker implementation outside the main thread');
}
options = options ?? {} as WorkerOptions;
- options.startDelay = options.startDelay ?? Constants.WORKER_START_DELAY;
+ options.startDelay = options?.startDelay ?? Constants.WORKER_START_DELAY;
options.poolOptions = options?.poolOptions ?? {} as PoolOptions<Worker>;
options?.messageHandler && (options.poolOptions.messageHandler = options.messageHandler);
let workerImplementation: WorkerAbstract = null;