Locking individual elements in a static collection?
- by user638474
I have a static collection of objects that will be frequently updated from multiple threads. Is it possible to lock individual objects in a collection instead of locking the entire collection so that only threads trying to access the same object in the collection would get blocked instead of every thread?
If there is a better way to update objects in a collection from multiple threads, I'm all ears.