Is there a Delphi implementation of an MREW (multiple read, exclusive write) lock, that favors reading over writing?
I think the TMultiReadExclusiveWriteSynchronizer already favors readers.
As the name of the component implies, a TMREWS should be used when there is much reading and little writing to be done. In addition, the READ operations should be kept to a MINIMUM otherwise your write threads could be left waiting indefinitely.
It is in the SysUtils unit.
Check out TJclMultiReadExclusiveWrite from the Project JEDI JCL (http://www.delphi-jedi.org/). The constructor of that class supports a parameter that tell the code which to favor - readers, writers, or consider them to be equal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With