pub fn on_shutdown(f: CleanupFn)
Registers a cleanup callback, run in reverse registration order during shutdown.