We have project targeted .NET 2.0 RTM (yes, it should be .NET 2.0 RTM, we have some orthodox clients). And I'm just wondering what are the downsides of ReaderWriterLock? Why is it so bad that everyone tell "don't use it, try to use something else like lock
statement"? If we could use .NET 3.5, I would definitely use ReaderWriterLockSlim, but with ReaderWriterLock
I'm a little scary with all these warning coming from everywhere. Does anybody measured performance or whatever? If there are some performance issues, under what payload can we encounter them?
We have a classic situation in terms of ReaderWriterLock
main purpose, i.e. multiple reads and rarely writes. Using lock
statement would block all readers. Perhaps it's not an awful issue for us, but if I could use ReaderWriterLock
I would be more satisfied. IMO introducing several monitors is a very very bad idea indeed.
lock
statement and if we face the problem of multiple locks I'll try usingReaderWriterLock
or look into alternatives. – Eatables