Function with_thread_data

Source
fn with_thread_data<T>(f: impl FnOnce(&ThreadData) -> T) -> T