vipyrsec / dragonfly-client-rs

Dragonfly client written in Rust
https://docs.vipyrsec.com/dragonfly-client-rs/dragonfly_client_rs/
MIT License
4 stars 2 forks source link

Migrate over to sync::RwLock from sync::Mutex #22

Closed Robin5605 closed 1 year ago

Robin5605 commented 1 year ago

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.