#![allow(dead_code, deprecated, unused_variables, unused_mut)] use std::sync::atomic::{AtomicUsize, Ordering}; static GLOBAL_THREAD_COUNT: AtomicUsize = AtomicUsize::new(0); fn main() { let old_thread_count = GLOBAL_THREAD_COUNT.fetch_add(1, Ordering::Relaxed); println!("live threads: {}", old_thread_count + 1); }