with_current_info

Function with_current_info 

Source
pub fn with_current_info<R>(f: impl FnOnce(Option<&ThreadInfo>) -> R) -> R
Available on non-miri and (Linux or FreeBSD or target_os=hurd or macOS or NetBSD or OpenBSD or Solaris or illumos) only.
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.