'exit' 事件


一旦工作线程停止,则会触发 'exit' 事件。 如果工作线程是通过调用 process.exit() 退出的,则 exitCode 参数就是传入的退出码。 如果工作线程被终止,则 exitCode 参数为 1

这是任何 Worker 实例触发的最终事件。

The 'exit' event is emitted once the worker has stopped. If the worker exited by calling process.exit(), the exitCode parameter is the passed exit code. If the worker was terminated, the exitCode parameter is 1.

This is the final event emitted by any Worker instance.