Function try_with_current

Source
pub(super) fn try_with_current<F, R>(f: F) -> R
where F: FnOnce(Option<&Thread>) -> R,
Expand description

Gets a reference to the handle of the thread that invokes it, if the handle has been initialized.