#shutdown #stdlib #ffi #std

shutdown_hooks

Shutdown hooks for Rust. Currently a friendly wrapper around atexit, will eventually allow you to remove hooks

5 releases

Uses old Rust 2015

0.1.0 Jul 29, 2015
0.0.3 Jul 29, 2015
0.0.2 Jul 29, 2015
0.0.1 Jul 29, 2015
0.0.0 Jul 29, 2015

#19 in #stdlib

Download history 12659/week @ 2024-03-14 15163/week @ 2024-03-21 14865/week @ 2024-03-28 15932/week @ 2024-04-04 14846/week @ 2024-04-11 14852/week @ 2024-04-18 14642/week @ 2024-04-25 13578/week @ 2024-05-02 10707/week @ 2024-05-09 9530/week @ 2024-05-16 9265/week @ 2024-05-23 9490/week @ 2024-05-30 9118/week @ 2024-06-06 8966/week @ 2024-06-13 7875/week @ 2024-06-20 8241/week @ 2024-06-27

35,797 downloads per month
Used in 5 crates (3 directly)

MIT license

3KB

shutdown_hooks Build Status Crates.io

Shutdown hook functionality for Rust. Basically a wrapper around atexit for now

An unspecified future release will feature the ability to remove shutdown hooks

#Notes

So far, I have successfully tested an eight-second long shutdown hook under Windows. I haven't tested any longer than that, but you should be fine. If not, you would have faced the same issue with atexit anyway :)


lib.rs:

Provides access to shutdown hooks

Currently, only adding new hooks is supported.

An unspecified future release will have a collection of hooks and have the ability to remove them

No runtime deps