1 Answers
Maybe, but be careful. ReaderWriterLock is used to allow multiple threads toread from a data source, while still granting exclusive access to a single
writer thread. This makes sense for data access that is mostly read-only, but
there are some caveats. First, ReaderWriterLock is relatively poor performing
compared to Monitor.Enter/Exit, which offsets some of the benefits. Second,
you need to be very sure that the data structures you are accessing fully
support multithreaded read access. Finally, there is apparently a bug in the
v1.1 ReaderWriterLock that can cause starvation for writers when there are a
large number of readers.