addHook


Description:

public static void addHook (ShutdownHookFunc func)

Registers a callback executed when the process exits normally.

Example:

    ShutdownHooks.addHook (() => {
print ("cleanup\n");
});

Parameters:

func

callback to execute at process shutdown.