For sharing a map between thread, you typically want to put it in an Arc. A less artificial (and actually multi-threaded) examples can be found in examples/wordcount.rs. This hashtable works by ...