#per-thread #panic-hook #thread-local #set-hook #update-hook

thread-local-panic-hook

Panic hooks that work per thread

1 unstable release

0.1.0 Aug 4, 2022

#807 in Concurrency

Download history 176/week @ 2024-04-07 521/week @ 2024-04-14 353/week @ 2024-04-21 397/week @ 2024-04-28 319/week @ 2024-05-05 615/week @ 2024-05-12 675/week @ 2024-05-19 568/week @ 2024-05-26 756/week @ 2024-06-02 632/week @ 2024-06-09 396/week @ 2024-06-16 604/week @ 2024-06-23 307/week @ 2024-06-30 420/week @ 2024-07-07 376/week @ 2024-07-14 487/week @ 2024-07-21

1,632 downloads per month

GPL-3.0 license

4KB
71 lines

Thread Local Panic Hook

A simple crate that implements a std::panic::{set_hook, take_hook, update_hook} drop in replacements that work per thread.

When target family is wasm, this crate does nothing and just re-exports the std versions.


lib.rs:

This crate provides a wrapper around std::panic::{set_hook, take_hook, update_hook} that work per thread.

When building for a wasm, we just re-export the original methods found in the std library.

No runtime deps