onShutdown

abstract fun onShutdown(listener: () -> Unit)

Adds a listener which will be notified when the environment shuts down. Note that this is only true for graceful termination. If a SIGKILL is sent for example graceful termination is not possible.

Sources

(source)
Link copied to clipboard