Function with_current_info

Source
pub fn with_current_info<R>(f: impl FnOnce(Option<&ThreadInfo>) -> R) -> R
Expand description

Get the current thread’s information, if available.

Calling this function might freeze other threads if they attempt to modify their thread information. Thus, the caller should ensure that the process is aborted shortly after this function is called.

This function is guaranteed to be async-signal-safe if f is too.