Is there any sort of "on exit" or "on close" event callback for workers?

Is there any sort of "on exit" or "on close" event callback for workers?
Was this page helpful?