ExitManager
Defined in: packages/app-system/src/process/exit-manager.ts:21
Methods
Section titled “Methods”registerCleanUpHandler()
Section titled “registerCleanUpHandler()”registerCleanUpHandler(
handler,priority?):Callable
Defined in: packages/app-system/src/process/exit-manager.ts:59
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.
Parameters
Section titled “Parameters”handler
Section titled “handler”MaybeAsyncCallable
A function to be called on process exit.
priority?
Section titled “priority?”The priority of the clean-up handler.
Returns
Section titled “Returns”Callable
registerExitHandler()
Section titled “registerExitHandler()”registerExitHandler(
handler,priority?):Callable
Defined in: packages/app-system/src/process/exit-manager.ts:94
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.
Parameters
Section titled “Parameters”handler
Section titled “handler”Callable
A synchronous function to be called on process exit.
priority?
Section titled “priority?”ExitManagerPriority = ExitManagerPriority.NORMAL
The priority of the exit handler.
Returns
Section titled “Returns”Callable
unregisterCleanUpHandler()
Section titled “unregisterCleanUpHandler()”unregisterCleanUpHandler(
handler,priority?):void
Defined in: packages/app-system/src/process/exit-manager.ts:75
Unregister a previously registered clean-up handler.
Parameters
Section titled “Parameters”handler
Section titled “handler”MaybeAsyncCallable
A function to be removed from the clean-up handlers.
priority?
Section titled “priority?”The priority of the clean-up handler. (optional, for disambiguation)
Returns
Section titled “Returns”void
unregisterExitHandler()
Section titled “unregisterExitHandler()”unregisterExitHandler(
handler,priority?):void
Defined in: packages/app-system/src/process/exit-manager.ts:110
Unregister a previously registered exit handler.
Parameters
Section titled “Parameters”handler
Section titled “handler”Callable
A function to be removed from the exit handlers.
priority?
Section titled “priority?”The priority of the exit handler. (optional, for disambiguation)
Returns
Section titled “Returns”void
getInstance()
Section titled “getInstance()”
staticgetInstance():ExitManager
Defined in: packages/app-system/src/process/exit-manager.ts:23
Returns
Section titled “Returns”ExitManager