#ffi #shutdown #stdlib #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

#4 in #shutdown

Download history 250/week @ 2021-01-09 399/week @ 2021-01-16 219/week @ 2021-01-23 648/week @ 2021-01-30 866/week @ 2021-02-06 741/week @ 2021-02-13 598/week @ 2021-02-20 520/week @ 2021-02-27 333/week @ 2021-03-06 676/week @ 2021-03-13 445/week @ 2021-03-20 463/week @ 2021-03-27 570/week @ 2021-04-03 417/week @ 2021-04-10 1547/week @ 2021-04-17 2029/week @ 2021-04-24

1,670 downloads per month
Used in pgx-tests

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