Function crossbeam_utils::sync::sharded_lock::current_index
source · fn current_index() -> Option<usize>
Expand description
Returns a usize
that identifies the current thread.
Each thread is associated with an ‘index’. While there are no particular guarantees, indices usually tend to be consecutive numbers between 0 and the number of running threads.
Since this function accesses TLS, None
might be returned if the current thread’s TLS is
tearing down.