}
}
-/// Get an address that is unique per running thread.
-///
-/// This can be used as a non-null usize-sized ID.
-pub fn current_thread_unique_ptr() -> usize {
- // Use a non-drop type to make sure it's still available during thread destruction.
- thread_local! { static X: u8 = 0 }
- X.with(|x| <*const _>::addr(x))
-}
-
pub fn current_thread() -> Option<Thread> {
ThreadInfo::with(|info| info.thread.clone())
}