#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

#777 in Concurrency

Download history 239/week @ 2023-12-04 394/week @ 2023-12-11 120/week @ 2023-12-18 152/week @ 2023-12-25 13/week @ 2024-01-01 372/week @ 2024-01-08 312/week @ 2024-01-15 289/week @ 2024-01-22 155/week @ 2024-01-29 246/week @ 2024-02-05 216/week @ 2024-02-12 331/week @ 2024-02-19 235/week @ 2024-02-26 186/week @ 2024-03-04 351/week @ 2024-03-11 332/week @ 2024-03-18

1,106 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