Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
}
/**
- * Safe helper to get the host OS optimized maximum pool size.
+ * Returns safe host OS optimized estimate of the default amount of parallelism a pool should use.
+ * Always returns a value greater than zero.
+ *
+ * @returns The host OS optimized maximum pool size.
*/
export const availableParallelism = (): number => {
let availableParallelism = 1
* Handles an error and convert it to a string so it can be sent back to the main worker.
*
* @param e - The error raised by the worker.
- * @returns Message of the error.
+ * @returns The error message.
*/
protected handleError (e: Error | string): string {
return e as string