A function to be called on process exit.
The priority of the clean-up handler.
Registers a synchronous exit handler to be called when the process is exiting.
Note: The handler should be a synchronous function. Asynchronous operations may not complete before the process exits.
A synchronous function to be called on process exit.
The priority of the exit handler.
Unregister a previously registered clean-up handler.
A function to be removed from the clean-up handlers.
Optional
priority: ExitManagerPriorityThe priority of the clean-up handler. (optional, for disambiguation)
Unregister a previously registered exit handler.
A function to be removed from the exit handlers.
Optional
priority: ExitManagerPriorityThe priority of the exit handler. (optional, for disambiguation)
Static
get
Register a possibly asynchronous clean-up handler to be called when the process is exiting.
Note: The handler can be an asynchronous function. The process will wait for the promise to resolve before exiting.