1 import { threadId
} from
'worker_threads';
3 import chalk from
'chalk';
5 export class WorkerUtils
{
6 private constructor() {
10 public static defaultExitHandler
= (code
: number): void => {
12 console
.error(chalk
.red(`Worker ${threadId} stopped with exit code ${code}`));