I'm trying to make a function that count the frequency of letters in multithread.
But I am stuck because I don't know how to share a HashMap between threads.
I tried that :
But I have the following error :
move occurs because `freq_map` has type `std::sync::Arc<std::sync::RwLock<std::collections::HashMap<char, i32>>>`, which does not implement the `Copy` trait
Can you explain me how to share a hashmap between threads please ?