<commit_before><commit_msg>Add new example: threads<commit_after>extern crate ears;
use ears::{Sound, AudioController};
use std::thread;

fn main() {
    let mut handles = Vec::new();
    for _ in 0..10 {
        let handle = thread::spawn(move || {
            let mut snd = Sound::new("res/shot.wav").unwrap();
            snd.play();
            while snd.is_playing() {}
        });
        handles.push(handle);
    }

    for h in handles {
        match h.join() {
            Ok(_)  => println!("Thread exited successfully"),
            Err(_) => println!("Thread died"),
        };
    }
}
{'fraction_non_alphanumeric': 0.15859766277128548, 'fraction_numerical': 0.005008347245409015, 'mean_word_length': 2.0927835051546393, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6231166', 'n_tokens_mistral': 181, 'n_tokens_neox': 179, 'n_words': 44}