Skip to main content

set_close_on_exit_handler

Function set_close_on_exit_handler 

Source
pub fn set_close_on_exit_handler(f: Arc<dyn Fn(String, String) + Send + Sync>)
Expand description

Install the close-on-exit callback. Called exactly once, from bootstrap::install_close_on_exit_handler right after AppState is built in main.rs — see that function’s doc comment for what the callback actually does. A second call is a no-op (OnceLock::set silently returns Err on an already-initialized cell, which this discards — matching broker::process::set_global’s identical fire-and-forget style; there is exactly one legitimate caller).