Threading – Using ReaderWriterLockSlim
When dealing with concurrency/threading issues in .Net, the normal approach is to use lock() to lock a dedicated sync object like this: This is an efficient, simple and well proven way to get thread-safety in .Net and is probably all you’ll ever need in your project. However, as this approach ensures only one thread can …