We should consider using a std::sync::RwLock instead of std::sync::Mutex (which is what we're currently using) because most of the time we're simply reading (and not writing). This seems to be causing a bug where one thread holds the lock the whole time it's scanning, so no other threads can do anything. This defeats the entire purpose of being multithreaded.
We should consider using a
std::sync::RwLock
instead ofstd::sync::Mutex
(which is what we're currently using) because most of the time we're simply reading (and not writing). This seems to be causing a bug where one thread holds the lock the whole time it's scanning, so no other threads can do anything. This defeats the entire purpose of being multithreaded.