开发者

Delphi MREW implementation that favors readers?

Is there a Delphi implementation of an MREW (multiple read, exclusive write) lock, that favors readin开发者_C百科g 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜