I am currently working on a project where I have a
Mutex<Vec<T>> in a
I have a multithreaded websocket system that access to this
Vec. There are now so many request that is it always locked so connection are not able to access it.
I have got ideas to resolve this problem but I don't know how to implement them in Rust:
- Have a thread that manage the Vector
- Have a lockable array for editing it and a shared for reading
- Have a sort of mutex but that can read without locking or allow multiple read instance at the same time
(There are around 2000 locks per second and a third lock the array)
Thank's by advance for helping me.