Function std::rt::at_exit
[−]
[src]
pub fn at_exit<F: FnOnce() + Send + 'static>(f: F) -> Result<(), ()>
Enqueues a procedure to run when the main thread exits.
Currently these closures are only run once the main Rust thread exits.
Once the at_exit
`at_exit` handlers begin running, more may be enqueued, but not
infinitely so. Eventually a handler registration will be forced to fail.
Returns Ok
`Okif the handler was successfully registered, meaning that the closure will be run once the main thread exits. Returns
` if the handler was successfully registered, meaning that the
closure will be run once the main thread exits. Returns Err
`Err` to indicate
that the closure could not be registered, meaning that it is not scheduled
to be rune.