ttlog 0.1.21

High-performance lock-free tracing and logging system
Documentation
1
2
3
4
5
6
7
pub fn current_thread_id_u32() -> u32 {
  use std::collections::hash_map::DefaultHasher;
  use std::hash::{Hash, Hasher};
  let mut hasher = DefaultHasher::new();
  std::thread::current().id().hash(&mut hasher);
  hasher.finish() as u32
}