I think this will work:
use std::thread;

fn main() {
    let mut count = 0;
    let mut threads = vec![];

    for _ in 0..2 {
        let thread = thread::spawn(move || {
            let mut local_count = 0;
            while local_count < 10 {
                // Critical section
                atomic::fetch_add(&mut count, 1, Ordering::Relaxed);
                println!("Thread {}: count = {}", thread::current().id(), count);
                local_count += 1;
            }
        });
        threads.push(thread);
    }

    for thread in threads {
        thread.join().unwrap();
    }
}
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence