Function current_id

Source
pub(crate) fn current_id() -> ThreadId
Expand description

Gets the id of the thread that invokes it.

This function will always succeed, will always return the same value for one thread and is guaranteed not to call the global allocator.