lasso 0.7.3

A multithreaded and single threaded string interner that allows strings to be cached with a minimal memory footprint, associating them with a unique key that can be used to retrieve them at any time.
Documentation
use lasso::ThreadedRodeo;
use std::sync::{Arc, Barrier};

fn main() {
    let thread_count = 10;
    let barrier = Arc::new(Barrier::new(thread_count));
    let interner = Arc::new(ThreadedRodeo::default());

    let mut handles = Vec::with_capacity(thread_count);
    for _ in 0..thread_count {
        let barrier = barrier.clone();
        let interner = interner.clone();
        handles.push(std::thread::spawn(move || {
            for i in 0..=100_000 {
                interner.get_or_intern(format!("Hello, world! {}", i));

                if (i % 1000) == 0 {
                    barrier.wait();
                    println!("{}", i);
                }
            }
        }));
    }

    for handle in handles {
        handle.join().unwrap();
    }
}