pub fn with_thread_self<F, R>(f: F) -> R
Expand description
Provides temporary scoped access to the current thread’s handle.
Callers who need to store a thread handle or to send it to another thread should duplicate the handle to ensure it can outlive the current thread.