*/
export const PoolEvents = Object.freeze({
full: 'full',
- busy: 'busy'
+ busy: 'busy',
+ error: 'error'
} as const)
/**
* The worker choice strategy options.
*/
workerChoiceStrategyOptions?: WorkerChoiceStrategyOptions
+ /**
+ * Restart worker on error.
+ */
+ restartWorkerOnError?: boolean
/**
* Pool events emission.
*
*
* - `'full'`: Emitted when the pool is dynamic and full.
* - `'busy'`: Emitted when the pool is busy.
+ * - `'error'`: Emitted when an error occurs.
*/
readonly emitter?: PoolEmitter
/**