Function with_current_name

Source
pub(crate) fn with_current_name<F, R>(f: F) -> R
where F: FnOnce(Option<&str>) -> R,
Expand description

Run a function with the current thread’s name.

Modulo thread local accesses, this function is safe to call from signal handlers and in similar circumstances where allocations are not possible.