Alternate fairness property for ReaderWriterLockSlim
The documentation describes the fairness policy for ReaderWriterLockSlim and mentions that "Future versions of the .NET Framework may introduce new fairness policies." I would like to vote for an option to match that of ReaderWriterLock.
Specifically, I need essentially queue up the requests in order, once a write lock is granted, then all read locks block (no different from today), but, when the write lock is released then all pending read locks will be guaranteed to be granted (does not work that way in ReaderWriterLockSlim, but does in ReaderWriterLock). If a write lock is requested and blocks because all of the read locks have not been released yet, it will block (same as today) and any new read locks will block because there is a pending write lock, again does not work that way in ReaderWriterLockSlim, but does in ReaderWriterLock.
Thank you,
Jim