D const enables multi-reader synchronization
Sean Kelly
sean at invisibleduck.org
Mon Jun 14 21:11:21 PDT 2010
Tomek Sowiñski Wrote:
>
> 3. If answer to 2. is yes, how do we tackle write-starvation? In a
> read-mostly scenario the mutating thread may be held up forever.
The implementation in core.sync.rwmutex can be set to favor readers or writers. So you can choose the method most appropriate to your use case. I imagine something more balanced would be possible as well, but I didn't want to get too fancy.
More information about the Digitalmars-d
mailing list