digitalmars.D - Re: D const enables multi-reader synchronization
- Sean Kelly <sean invisibleduck.org> Jun 14 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.
Jun 14 2010